protected function importMigration(Migration $migration) {
    // Run dependencies first.
    $dependencies = $migration->getMigrationDependencies();
    $required_ids = $dependencies['required'];
    if ($required_ids) {
      $required_migrations = $this->migrationManager->createInstances($required_ids);
      array_walk($required_migrations, [$this, 'importMigration']);
    }

    $message = new MigrateMessage();
    $executable = new MigrateExecutable($migration, $message);
    $executable->import();
  }
protected function importMigration(Migration $migration) {
    // Run dependencies first.
    $dependencies = $migration->getMigrationDependencies();
    $required_ids = $dependencies['required'];
    if ($required_ids) {
      $required_migrations = $this->migrationManager->createInstances($required_ids);
      array_walk($required_migrations, [$this, 'importMigration']);
    }

    $message = new MigrateMessage();
    $executable = new MigrateExecutable($migration, $message);
    $executable->import();
  }
protected function importMigration ( Migration $ migration ) { // Run dependencies first. $ dependencies = $ migration -> getMigrationDependencies ( ) ; $ required_ids = $ dependencies [ 'required' ] ; if ( $ required_ids ) { $ required_migrations = $ this -> migrationManager -> createInstances ( $ required_ids ) ; array_walk ( $ required_migrations , [ $ this , 'importMigration' ] ) ; } $ message = new MigrateMessage ( ) ; $ executable = new MigrateExecutable ( $ migration , $ message ) ; $ executable -> import ( ) ; }
Import single migration with dependencies.

@param \Drupal\migrate\Plugin\Migration $migration
Migration.
Import single migration with dependencies .