public static function ColorFieldFormatterSwatch::defaultSettings in Color Field 8.2
Defines the default settings for this plugin.
Return value
array A list of default settings, keyed by the setting name.
Overrides PluginSettingsBase::defaultSettings
File
- src/
Plugin/ Field/ FieldFormatter/ ColorFieldFormatterSwatch.php, line 29
Class
- ColorFieldFormatterSwatch
- Plugin implementation of the color_field swatch formatter.
Namespace
Drupal\color_field\Plugin\Field\FieldFormatterCode
public static function defaultSettings() {
return [
'shape' => 'square',
'width' => 50,
'height' => 50,
'opacity' => TRUE,
'data_attribute' => FALSE,
] + parent::defaultSettings();
}