public function ContentEntityDeriver::getDerivativeDefinitions in Workbench Moderation to Content Moderation 8.2
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 ContentEntityDeriver::getDerivativeDefinitions()
- ModerationDeriver::getDerivativeDefinitions in src/
Plugin/ Deriver/ ModerationDeriver.php - Gets the definition of all derivatives of a base plugin.
1 method overrides ContentEntityDeriver::getDerivativeDefinitions()
- ModerationDeriver::getDerivativeDefinitions in src/
Plugin/ Deriver/ ModerationDeriver.php - Gets the definition of all derivatives of a base plugin.
File
- src/
Plugin/ migrate/ source/ ContentEntityDeriver.php, line 43
Class
Namespace
Drupal\wbm2cm\Plugin\migrate\sourceCode
public function getDerivativeDefinitions($base_plugin_definition) {
foreach ($this->entityTypeManager
->getDefinitions() as $id => $entity_type) {
if ($this
->isCompatible($entity_type)) {
$derivative = $base_plugin_definition;
$derivative['source_module'] = $entity_type
->getProvider();
$this->derivatives[$id] = $derivative;
}
}
return parent::getDerivativeDefinitions($base_plugin_definition);
}