public function TypedDataPropertyDeriverBase::getDerivativeDefinitions in Chaos Tool Suite (ctools) 8.3
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: The definition array of the base plugin.
Return value
array An array of full derivative definitions keyed on derivative id.
Overrides DeriverBase::getDerivativeDefinitions
See also
getDerivativeDefinition()
1 call to TypedDataPropertyDeriverBase::getDerivativeDefinitions()
- TypedDataLanguageRelationshipDeriver::getDerivativeDefinitions in src/
Plugin/ Deriver/ TypedDataLanguageRelationshipDeriver.php - Gets the definition of all derivatives of a base plugin.
1 method overrides TypedDataPropertyDeriverBase::getDerivativeDefinitions()
- TypedDataLanguageRelationshipDeriver::getDerivativeDefinitions in src/
Plugin/ Deriver/ TypedDataLanguageRelationshipDeriver.php - Gets the definition of all derivatives of a base plugin.
File
- src/
Plugin/ Deriver/ TypedDataPropertyDeriverBase.php, line 61
Class
Namespace
Drupal\ctools\Plugin\DeriverCode
public function getDerivativeDefinitions($base_plugin_definition) {
foreach ($this->typedDataManager
->getDefinitions() as $data_type_id => $data_type_definition) {
if (is_subclass_of($data_type_definition['class'], ComplexDataInterface::class, TRUE)) {
/** @var \Drupal\Core\TypedData\ComplexDataDefinitionInterface $base_definition */
$base_definition = $this->typedDataManager
->createDataDefinition($data_type_id);
foreach ($base_definition
->getPropertyDefinitions() as $property_name => $property_definition) {
if ($property_definition instanceof BaseFieldDefinition || $property_definition instanceof FieldConfig) {
$this
->generateDerivativeDefinition($base_plugin_definition, $data_type_id, $data_type_definition, $base_definition, $property_name, $property_definition);
}
}
}
}
return $this->derivatives;
}