You are here

public static function ToggleEditableFormatter::defaultSettings in Toggle Editable fields 8

Defines the default settings for this plugin.

Return value

array A list of default settings, keyed by the setting name.

Overrides PluginSettingsBase::defaultSettings

1 call to ToggleEditableFormatter::defaultSettings()
ToggleEditableFieldsUiTest::assertDefaultFieldSettings in tests/src/Functional/ToggleEditableFieldsUiTest.php
Assert default field settings are correctly set.

File

src/Plugin/Field/FieldFormatter/ToggleEditableFormatter.php, line 92

Class

ToggleEditableFormatter
Plugin implementation of the 'ranking' formatter.

Namespace

Drupal\toggle_editable_fields\Plugin\Field\FieldFormatter

Code

public static function defaultSettings() {
  return [
    'on' => 'On',
    'off' => 'Off',
    'size' => 'small',
    'onstyle' => 'success',
    'offstyle' => 'default',
    'height' => NULL,
    'width' => NULL,
  ] + parent::defaultSettings();
}