You are here

protected function TypedDataLanguageRelationshipDeriver::generateDerivativeDefinition in Chaos Tool Suite (ctools) 8.3

Generates and maintains a derivative definition.

This method should directly manipulate $this->derivatives and not return values. This allows implementations control over the derivative names.

Parameters

$base_plugin_definition: The base plugin definition.

string $data_type_id: The plugin id of the data type.

mixed $data_type_definition: The plugin definition of the data type.

\Drupal\Core\TypedData\DataDefinitionInterface $base_definition: The data type definition of a complex data object.

string $property_name: The name of the property.

\Drupal\Core\TypedData\DataDefinitionInterface $property_definition: The property definition.

Overrides TypedDataRelationshipDeriver::generateDerivativeDefinition

File

src/Plugin/Deriver/TypedDataLanguageRelationshipDeriver.php, line 21

Class

TypedDataLanguageRelationshipDeriver

Namespace

Drupal\ctools\Plugin\Deriver

Code

protected function generateDerivativeDefinition($base_plugin_definition, $data_type_id, $data_type_definition, DataDefinitionInterface $base_definition, $property_name, DataDefinitionInterface $property_definition) {
  if (method_exists($property_definition, 'getType') && $property_definition
    ->getType() == 'language') {
    parent::generateDerivativeDefinition($base_plugin_definition, $data_type_id, $data_type_definition, $base_definition, $property_name, $property_definition);
  }
}