public function MigrateEntity::getDerivativeDefinitions in Drupal 10
Same name and namespace in other branches
- 8 core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php \Drupal\migrate\Plugin\Derivative\MigrateEntity::getDerivativeDefinitions()
- 9 core/modules/migrate/src/Plugin/Derivative/MigrateEntity.php \Drupal\migrate\Plugin\Derivative\MigrateEntity::getDerivativeDefinitions()
File
- core/
modules/ migrate/ src/ Plugin/ Derivative/ MigrateEntity.php, line 57
Class
Namespace
Drupal\migrate\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\\migrate\\Plugin\\migrate\\destination\\EntityContentBase';
$this->derivatives[$entity_type] = [
'id' => "entity:{$entity_type}",
'class' => $class,
'requirements_met' => 1,
'provider' => $entity_info
->getProvider(),
];
}
return $this->derivatives;
}