public function DsTestTrait::entitiesSetLabelClass in Display Suite 8.2
Set the label.
3 calls to DsTestTrait::entitiesSetLabelClass()
- FieldTemplateTest::testDsFieldTemplate in src/
Tests/ FieldTemplateTest.php - Tests on field templates.
- FieldTemplateTest::testDsFieldTemplate2 in src/
Tests/ FieldTemplateTest.php - Tests on field templates.
- FieldTemplateTest::testDsFieldTemplate5 in src/
Tests/ FieldTemplateTest.php - Tests on field templates.
File
- src/
Tests/ DsTestTrait.php, line 211
Class
- DsTestTrait
- Provides common functionality for the Display Suite test classes.
Namespace
Drupal\ds\TestsCode
public function entitiesSetLabelClass($label, $field_name, $text = '', $class = '', $show_colon = FALSE) {
$edit = array(
'fields[' . $field_name . '][label]' => $label,
);
if (!empty($text)) {
$edit['fields[' . $field_name . '][settings_edit_form][third_party_settings][ds][ft][settings][lb]'] = $text;
}
if (!empty($class)) {
$edit['fields[' . $field_name . '][settings_edit_form][third_party_settings][ds][ft][settings][classes][]'] = $class;
}
if ($show_colon) {
$edit['fields[' . $field_name . '][settings_edit_form][third_party_settings][ds][ft][settings][lb-col]'] = '1';
}
$this
->dsEditFormatterSettings($edit);
}