protected function TypedDataEntityRelationshipDeriver::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/ TypedDataEntityRelationshipDeriver.php, line 18
Class
Namespace
Drupal\ctools\Plugin\DeriverCode
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() == 'entity_reference') {
parent::generateDerivativeDefinition($base_plugin_definition, $data_type_id, $data_type_definition, $base_definition, $property_name, $property_definition);
}
}