You are here

protected function MigrateUpgradeDrushRunner::substituteIds in Migrate Upgrade 8.2

Same name and namespace in other branches
  1. 8.3 src/MigrateUpgradeDrushRunner.php \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::substituteIds()

Rewrite any migration plugin IDs so they won't conflict with the core IDs.

Parameters

$entity_array: A configuration array for a migration.

Return value

array The migration configuration array modified with new IDs.

1 call to MigrateUpgradeDrushRunner::substituteIds()
MigrateUpgradeDrushRunner::export in src/MigrateUpgradeDrushRunner.php
Export the configured migration plugins as configuration entities.

File

src/MigrateUpgradeDrushRunner.php, line 212

Class

MigrateUpgradeDrushRunner

Namespace

Drupal\migrate_upgrade

Code

protected function substituteIds($entity_array) {
  $entity_array['id'] = $this
    ->modifyId($entity_array['id']);
  foreach ($entity_array['migration_dependencies'] as $type => $dependencies) {
    foreach ($dependencies as $key => $dependency) {
      $entity_array['migration_dependencies'][$type][$key] = $this
        ->modifyId($dependency);
    }
  }
  $this
    ->substituteMigrationIds($entity_array['process']);
  return $entity_array;
}