public function FieldTypePluginManager::getDefaultStorageSettings in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Field/FieldTypePluginManager.php \Drupal\Core\Field\FieldTypePluginManager::getDefaultStorageSettings()
Returns the default storage-level settings for a field type.
Parameters
string $type: A field type name.
Return value
array The type's default settings, as provided by the plugin definition, or an empty array if type or settings are undefined.
Overrides FieldTypePluginManagerInterface::getDefaultStorageSettings
File
- core/
lib/ Drupal/ Core/ Field/ FieldTypePluginManager.php, line 103
Class
- FieldTypePluginManager
- Plugin manager for 'field type' plugins.
Namespace
Drupal\Core\FieldCode
public function getDefaultStorageSettings($type) {
$plugin_definition = $this
->getDefinition($type, FALSE);
if (!empty($plugin_definition['class'])) {
$plugin_class = DefaultFactory::getPluginClass($type, $plugin_definition);
return $plugin_class::defaultStorageSettings();
}
return [];
}