public function FieldStorageConfig::getSettings in Drupal 9
Same name and namespace in other branches
- 8 core/modules/field/src/Entity/FieldStorageConfig.php \Drupal\field\Entity\FieldStorageConfig::getSettings()
Returns the storage settings.
Each field type defines the settings that are meaningful for that type. For example, a text field can define a 'max_length' setting, and an image field can define an 'alt_field_required' setting.
The method always returns an array of all available settings for this field type, possibly with the default values merged in if values have not been provided for all available settings.
Return value
mixed[] An array of key/value pairs.
Overrides FieldStorageDefinitionInterface::getSettings
1 call to FieldStorageConfig::getSettings()
- FieldStorageConfig::getSetting in core/
modules/ field/ src/ Entity/ FieldStorageConfig.php - Returns the value of a given storage setting.
File
- core/
modules/ field/ src/ Entity/ FieldStorageConfig.php, line 541
Class
- FieldStorageConfig
- Defines the Field storage configuration entity.
Namespace
Drupal\field\EntityCode
public function getSettings() {
// @todo FieldTypePluginManager maintains its own static cache. However, do
// some CPU and memory profiling to see if it's worth statically caching
// $field_type_info, or the default field storage and field settings,
// within $this.
$field_type_manager = \Drupal::service('plugin.manager.field.field_type');
$settings = $field_type_manager
->getDefaultStorageSettings($this
->getType());
return $this->settings + $settings;
}