function MigrationPluginManager::expandPluginIds
Same name in other branches
- 9 core/modules/migrate/src/Plugin/MigrationPluginManager.php \Drupal\migrate\Plugin\MigrationPluginManager::expandPluginIds()
- 10 core/modules/migrate/src/Plugin/MigrationPluginManager.php \Drupal\migrate\Plugin\MigrationPluginManager::expandPluginIds()
- 11.x core/modules/migrate/src/Plugin/MigrationPluginManager.php \Drupal\migrate\Plugin\MigrationPluginManager::expandPluginIds()
Expand derivative migration dependencies.
We need to expand any derivative migrations. Derivative migrations are calculated by migration derivers such as D6NodeDeriver. This allows migrations to depend on the base id and then have a dependency on all derivative migrations. For example, d6_comment depends on d6_node but after we've expanded the dependencies it will depend on d6_node:page, d6_node:story and so on, for other derivative migrations.
Return value
array An array of expanded plugin ids.
1 call to MigrationPluginManager::expandPluginIds()
- MigrationPluginManager::createInstances in core/
modules/ migrate/ src/ Plugin/ MigrationPluginManager.php - Create pre-configured instance of plugin derivatives.
File
-
core/
modules/ migrate/ src/ Plugin/ MigrationPluginManager.php, line 152
Class
- MigrationPluginManager
- Plugin manager for migration plugins.
Namespace
Drupal\migrate\PluginCode
protected function expandPluginIds(array $migration_ids) {
$plugin_ids = [];
foreach ($migration_ids as $id) {
$plugin_ids += preg_grep('/^' . preg_quote($id, '/') . PluginBase::DERIVATIVE_SEPARATOR . '/', array_keys($this->getDefinitions()));
if ($this->hasDefinition($id)) {
$plugin_ids[] = $id;
}
}
return $plugin_ids;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.