function MigrateUpgradeImportBatch::onPostImport
Same name in other branches
- 9 core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php \Drupal\migrate_drupal_ui\Batch\MigrateUpgradeImportBatch::onPostImport()
- 10 core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php \Drupal\migrate_drupal_ui\Batch\MigrateUpgradeImportBatch::onPostImport()
- 11.x core/modules/migrate_drupal_ui/src/Batch/MigrateUpgradeImportBatch.php \Drupal\migrate_drupal_ui\Batch\MigrateUpgradeImportBatch::onPostImport()
Adds follow-up migrations.
Parameters
\Drupal\migrate\Event\MigrateImportEvent $event: The import event.
File
-
core/
modules/ migrate_drupal_ui/ src/ Batch/ MigrateUpgradeImportBatch.php, line 300
Class
- MigrateUpgradeImportBatch
- Runs a single migration batch.
Namespace
Drupal\migrate_drupal_ui\BatchCode
public static function onPostImport(MigrateImportEvent $event) {
$migration = $event->getMigration();
if ($migration instanceof MigrationWithFollowUpInterface) {
// After the migration on which they depend has been successfully
// executed, the follow-up migrations are immediately added to the batch
// and removed from the $followUpMigrations property. This means that the
// $followUpMigrations property is always empty at this point and it's OK
// to override it with the next follow-up migrations.
static::$followUpMigrations = $migration->generateFollowUpMigrations();
}
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.