protected function DoubleField::getSettings in Double Field 8.3
Same name in this branch
- 8.3 src/Plugin/Field/FieldWidget/DoubleField.php \Drupal\double_field\Plugin\Field\FieldWidget\DoubleField::getSettings()
- 8.3 src/Plugin/Field/FieldType/DoubleField.php \Drupal\double_field\Plugin\Field\FieldType\DoubleField::getSettings()
Returns the array of field settings.
Return value
array The array of settings.
Overrides FieldItemBase::getSettings
4 calls to DoubleField::getSettings()
- DoubleField::fieldSettingsForm in src/
Plugin/ Field/ FieldType/ DoubleField.php - Returns a form for the field-level settings.
- DoubleField::getConstraints in src/
Plugin/ Field/ FieldType/ DoubleField.php - @TODO: Find a way to disable constraints for default field values.
- DoubleField::isEmpty in src/
Plugin/ Field/ FieldType/ DoubleField.php - Determines whether the data structure is empty.
- DoubleField::storageSettingsForm in src/
Plugin/ Field/ FieldType/ DoubleField.php - Returns a form for the storage-level settings.
File
- src/
Plugin/ Field/ FieldType/ DoubleField.php, line 771
Class
- DoubleField
- Plugin implementation of the 'double_field' field type.
Namespace
Drupal\double_field\Plugin\Field\FieldTypeCode
protected function getSettings() {
$settings = parent::getSettings();
foreach ([
'first',
'second',
] as $subfield) {
// BC Layer. The settings below may not be set if site was updated from
// version below 3.3.
// @todo Remove this in 4.0.
if (!isset($settings[$subfield]['label'])) {
$settings[$subfield]['label'] = '';
}
}
return $settings;
}