function ContentEntityDeriver::getDerivativeDefinitions
Same name in other branches
- 8.9.x core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntityDeriver.php \Drupal\migrate_drupal\Plugin\migrate\source\ContentEntityDeriver::getDerivativeDefinitions()
- 10 core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntityDeriver.php \Drupal\migrate_drupal\Plugin\migrate\source\ContentEntityDeriver::getDerivativeDefinitions()
- 11.x core/modules/migrate_drupal/src/Plugin/migrate/source/ContentEntityDeriver.php \Drupal\migrate_drupal\Plugin\migrate\source\ContentEntityDeriver::getDerivativeDefinitions()
Overrides DeriverBase::getDerivativeDefinitions
File
-
core/
modules/ migrate_drupal/ src/ Plugin/ migrate/ source/ ContentEntityDeriver.php, line 48
Class
- ContentEntityDeriver
- Deriver for content entity source plugins.
Namespace
Drupal\migrate_drupal\Plugin\migrate\sourceCode
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives = [];
foreach ($this->entityTypeManager
->getDefinitions() as $id => $definition) {
if ($definition instanceof ContentEntityTypeInterface) {
$this->derivatives[$id] = $base_plugin_definition;
// Provide entity_type so the source can be used apart from a deriver.
$this->derivatives[$id]['entity_type'] = $id;
}
}
return parent::getDerivativeDefinitions($base_plugin_definition);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.