function ColorBackgroudFormatter::defaultSettings
Same name in other branches
- 3.x modules/field_example/src/Plugin/Field/FieldFormatter/ColorBackgroudFormatter.php \Drupal\field_example\Plugin\Field\FieldFormatter\ColorBackgroudFormatter::defaultSettings()
Set the default values for the formatter's configuration.
Overrides PluginSettingsBase::defaultSettings
File
-
modules/
field_example/ src/ Plugin/ Field/ FieldFormatter/ ColorBackgroudFormatter.php, line 62
Class
- ColorBackgroudFormatter
- Plugin implementation of the 'field_example_color_background' formatter.
Namespace
Drupal\field_example\Plugin\Field\FieldFormatterCode
public static function defaultSettings() {
// The keys of this array should match the form element names in
// settingsForm(), and the schema defined in
// config/schema/field_example.schema.yml.
return [
'adjust_text_color' => TRUE,
] + parent::defaultSettings();
}