protected function MultiversionMigration::executeMigration in Multiversion 8
Helper method for running a migration.
Parameters
\Drupal\migrate\Plugin\MigrationInterface $migration:
Return value
\Drupal\migrate\MigrateExecutableInterface
2 calls to MultiversionMigration::executeMigration()
File
- src/
MultiversionMigration.php, line 258
Class
Namespace
Drupal\multiversionCode
protected function executeMigration(MigrationInterface $migration) {
// Add necessary database connection that the Migrate API needs during
// a migration like this.
$connection_info = Database::getConnectionInfo('default');
foreach ($connection_info as $target => $value) {
$connection_info[$target]['prefix'] = [
'default' => $value['prefix']['default'],
];
}
Database::addConnectionInfo('migrate', 'default', $connection_info['default']);
$message = new MigrateMessage();
$executable = new MigrateExecutable($migration, $message);
$executable
->import();
return $executable;
}