function FieldTypePluginManager::getDefaultStorageSettings

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/FieldTypePluginManager.php \Drupal\Core\Field\FieldTypePluginManager::getDefaultStorageSettings()
  2. 10 core/lib/Drupal/Core/Field/FieldTypePluginManager.php \Drupal\Core\Field\FieldTypePluginManager::getDefaultStorageSettings()
  3. 11.x core/lib/Drupal/Core/Field/FieldTypePluginManager.php \Drupal\Core\Field\FieldTypePluginManager::getDefaultStorageSettings()

Overrides FieldTypePluginManagerInterface::getDefaultStorageSettings

File

core/lib/Drupal/Core/Field/FieldTypePluginManager.php, line 103

Class

FieldTypePluginManager
Plugin manager for 'field type' plugins.

Namespace

Drupal\Core\Field

Code

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 [];
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.