You are here

protected function MigrateManifest::executeMigration in Migrate Manifest 3.x

Same name and namespace in other branches
  1. 8.2 src/MigrateManifest.php \Drupal\migrate_manifest\MigrateManifest::executeMigration()
  2. 8 src/MigrateManifest.php \Drupal\migrate_manifest\MigrateManifest::executeMigration()

Execute a single migration.

Parameters

\Drupal\migrate\Plugin\MigrationInterface $migration: The migration to run.

Return value

\Drupal\migrate_manifest\MigrateExecutable The migration executable.

1 call to MigrateManifest::executeMigration()
MigrateManifest::import in src/MigrateManifest.php
Drush execution method. Runs imports on the supplied manifest.

File

src/MigrateManifest.php, line 188

Class

MigrateManifest

Namespace

Drupal\migrate_manifest

Code

protected function executeMigration(MigrationInterface $migration) {
  $run_migration = unserialize(serialize($migration));
  $this->logger
    ->notice(dt('Running @id', [
    '@id' => $run_migration
      ->id(),
  ]));
  $executable = new MigrateExecutable($run_migration, new DrushLogMigrateMessage($this->logger));

  // drush_op() provides --simulate support.
  return drush_op([
    $executable,
    'import',
  ]);
}