public static function DoubleField::defaultStorageSettings in Double Field 8.3
Same name and namespace in other branches
- 4.x src/Plugin/Field/FieldType/DoubleField.php \Drupal\double_field\Plugin\Field\FieldType\DoubleField::defaultStorageSettings()
Defines the storage-level settings for this plugin.
Return value
array A list of default settings, keyed by the setting name.
Overrides FieldItemBase::defaultStorageSettings
1 call to DoubleField::defaultStorageSettings()
- TestBase::createField in tests/
src/ FunctionalJavascript/ TestBase.php - Creates a field.
File
- src/
Plugin/ Field/ FieldType/ DoubleField.php, line 34
Class
- DoubleField
- Plugin implementation of the 'double_field' field type.
Namespace
Drupal\double_field\Plugin\Field\FieldTypeCode
public static function defaultStorageSettings() {
$settings = [];
foreach ([
'first',
'second',
] as $subfield) {
$settings['storage'][$subfield] = [
'type' => 'string',
'maxlength' => 255,
'precision' => 10,
'scale' => 2,
'datetime_type' => 'datetime',
];
}
return $settings + parent::defaultStorageSettings();
}