function FieldItemDeriver::getDerivativeDefinitions

Same name in other branches
  1. 9 core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php \Drupal\Core\Field\Plugin\DataType\Deriver\FieldItemDeriver::getDerivativeDefinitions()
  2. 8.9.x core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php \Drupal\Core\Field\Plugin\DataType\Deriver\FieldItemDeriver::getDerivativeDefinitions()
  3. 11.x core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php \Drupal\Core\Field\Plugin\DataType\Deriver\FieldItemDeriver::getDerivativeDefinitions()

Overrides DeriverInterface::getDerivativeDefinitions

1 call to FieldItemDeriver::getDerivativeDefinitions()
FieldItemDeriver::getDerivativeDefinition in core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php
Gets the definition of a derivative plugin.

File

core/lib/Drupal/Core/Field/Plugin/DataType/Deriver/FieldItemDeriver.php, line 73

Class

FieldItemDeriver
Provides data type plugins for each existing field type plugin.

Namespace

Drupal\Core\Field\Plugin\DataType\Deriver

Code

public function getDerivativeDefinitions($base_plugin_definition) {
    foreach ($this->fieldTypePluginManager
        ->getDefinitions() as $plugin_id => $definition) {
        $definition['definition_class'] = '\\Drupal\\Core\\Field\\TypedData\\FieldItemDataDefinition';
        $definition['list_definition_class'] = '\\Drupal\\Core\\Field\\BaseFieldDefinition';
        $definition['unwrap_for_canonical_representation'] = FALSE;
        $this->derivatives[$plugin_id] = $definition;
    }
    return $this->derivatives;
}

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