public function MigrateUpgradeDrushRunner::import in Migrate Upgrade 8.2
Same name and namespace in other branches
- 8.3 src/MigrateUpgradeDrushRunner.php \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::import()
- 8 src/MigrateUpgradeDrushRunner.php \Drupal\migrate_upgrade\MigrateUpgradeDrushRunner::import()
Run the configured migrations.
File
- src/
MigrateUpgradeDrushRunner.php, line 145
Class
Namespace
Drupal\migrate_upgradeCode
public function import() {
static::$messages = new DrushLogMigrateMessage();
if (drush_get_option('debug')) {
\Drupal::service('event_dispatcher')
->addListener(MigrateEvents::IDMAP_MESSAGE, [
get_class(),
'onIdMapMessage',
]);
}
foreach ($this->migrationList as $migration_id => $migration) {
drush_print(dt('Upgrading @migration', [
'@migration' => $migration_id,
]));
$executable = new MigrateExecutable($migration, static::$messages);
// drush_op() provides --simulate support.
drush_op([
$executable,
'import',
]);
}
}