public static function Base::defaultSettings in Double Field 4.x
Same name and namespace in other branches
- 8.3 src/Plugin/Field/FieldFormatter/Base.php \Drupal\double_field\Plugin\Field\FieldFormatter\Base::defaultSettings()
Defines the default settings for this plugin.
Return value
array A list of default settings, keyed by the setting name.
Overrides PluginSettingsBase::defaultSettings
6 calls to Base::defaultSettings()
- DateTimezoneTest::setUp in tests/
src/ Functional/ DateTimezoneTest.php - Details::defaultSettings in src/
Plugin/ Field/ FieldFormatter/ Details.php - Defines the default settings for this plugin.
- ListBase::defaultSettings in src/
Plugin/ Field/ FieldFormatter/ ListBase.php - Defines the default settings for this plugin.
- Table::defaultSettings in src/
Plugin/ Field/ FieldFormatter/ Table.php - Defines the default settings for this plugin.
- TestBase::createField in tests/
src/ FunctionalJavascript/ TestBase.php - Creates a field.
3 methods override Base::defaultSettings()
- Details::defaultSettings in src/
Plugin/ Field/ FieldFormatter/ Details.php - Defines the default settings for this plugin.
- ListBase::defaultSettings in src/
Plugin/ Field/ FieldFormatter/ ListBase.php - Defines the default settings for this plugin.
- Table::defaultSettings in src/
Plugin/ Field/ FieldFormatter/ Table.php - Defines the default settings for this plugin.
File
- src/
Plugin/ Field/ FieldFormatter/ Base.php, line 30
Class
- Base
- Base class for Double field formatters.
Namespace
Drupal\double_field\Plugin\Field\FieldFormatterCode
public static function defaultSettings() : array {
$settings = [];
foreach ([
'first',
'second',
] as $subfield) {
$settings[$subfield] = [
// Hidden option is useful to display data with Views module.
'hidden' => FALSE,
'link' => FALSE,
'format_type' => 'medium',
// @todo Create tests for this options.
'thousand_separator' => '',
'decimal_separator' => '.',
'scale' => 2,
'key' => FALSE,
];
}
return $settings + parent::defaultSettings();
}