public function MigrateEntity::getDerivativeDefinitions in GatherContent 8.5
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 DeriverInterface::getDerivativeDefinitions
See also
getDerivativeDefinition()
1 call to MigrateEntity::getDerivativeDefinitions()
- MigrateEntity::getDerivativeDefinition in src/
Plugin/ Derivative/ MigrateEntity.php - Gets the definition of a derivative plugin.
File
- src/
Plugin/ Derivative/ MigrateEntity.php, line 62
Class
- MigrateEntity
- Class MigrateEntity.
Namespace
Drupal\gathercontent\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
foreach ($this->entityDefinitions as $entity_type => $entity_info) {
$class = is_subclass_of($entity_info
->getClass(), 'Drupal\\Core\\Config\\Entity\\ConfigEntityInterface') ? 'Drupal\\migrate\\Plugin\\migrate\\destination\\EntityConfigBase' : 'Drupal\\gathercontent\\Plugin\\migrate\\destination\\GatherContentEntity';
$this->derivatives[$entity_type] = [
'id' => "gc_entity:{$entity_type}",
'class' => $class,
'requirements_met' => 1,
'provider' => $entity_info
->getProvider(),
];
}
return $this->derivatives;
}