function ColorBackgroudFormatter::defaultSettings

Same name and namespace in other branches
  1. 4.0.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\FieldFormatter

Code

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();
}