protected function execute(array $migration_ids, $method_name) {
    array_walk($migration_ids, function ($migration_id) use ($method_name) {
      /** @var \Drupal\migrate\Plugin\Migration $migration */
      if (!$migration = $this->manager->createInstance($migration_id)) {
        throw new PluginNotFoundException($migration_id);
      }
      $migrate_executable = (new MigrateExecutable($migration, new MigrateMessage()));
      call_user_func_array([$migrate_executable, $method_name], []);
    });
  }
protected function execute(array $migration_ids, $method_name) {
    array_walk($migration_ids, function ($migration_id) use ($method_name) {
      /** @var \Drupal\migrate\Plugin\Migration $migration */
      if (!$migration = $this->manager->createInstance($migration_id)) {
        throw new PluginNotFoundException($migration_id);
      }
      $migrate_executable = (new MigrateExecutable($migration, new MigrateMessage()));
      call_user_func_array([$migrate_executable, $method_name], []);
    });
  }
protected function execute ( array $ migration_ids , $ method_name ) { array_walk ( $ migration_ids , function ( $ migration_id ) use ( $ method_name ) { /** @var \Drupal\migrate\Plugin\Migration $migration */ if ( ! $ migration = $ this -> manager -> createInstance ( $ migration_id ) ) { throw new PluginNotFoundException ( $ migration_id ) ; } $ migrate_executable = ( new MigrateExecutable ( $ migration , new MigrateMessage ( ) ) ) ; call_user_func_array ( [ $ migrate_executable , $ method_name ] , [ ] ) ; } ) ; }
Import or remove content from migrations.

@param string[] $migration_ids
The list of migrations to run.
@param string $method_name
The method to execute: import or rollback.
Import or remove content from migrations .