protected function MigrationPluginAlterer::addRequirementsKey in Media Migration 8
Adds a "requirements" key to media migration plugins.
This method only required by migrate_tools since it searches migration dependencies in this key.
Parameters
array $migrations: The array of migration plugins.
1 call to MigrationPluginAlterer::addRequirementsKey()
- MigrationPluginAlterer::alter in modules/
media_migration_tools/ src/ MigrationPluginAlterer.php - Alters migrate plugins.
File
- modules/
media_migration_tools/ src/ MigrationPluginAlterer.php, line 57
Class
- MigrationPluginAlterer
- Migration plugin alterer for "fixing" migrations provided by Migrate Tools.
Namespace
Drupal\media_migration_toolsCode
protected function addRequirementsKey(array &$migrations) {
foreach ($migrations as $migration_plugin_id => $migration_definition) {
if (empty($migration_definition['migration_tags']) || !in_array(MediaMigration::MIGRATION_TAG_MAIN, $migration_definition['migration_tags'], TRUE) || empty($migration_definition['migration_dependencies']['required'])) {
continue;
}
$migrations[$migration_plugin_id]['requirements'] = $migration_definition['migration_dependencies']['required'];
}
}