interface MigrationWithFollowUpInterface
Same name in other branches
- 9 core/modules/migrate_drupal/src/Plugin/MigrationWithFollowUpInterface.php \Drupal\migrate_drupal\Plugin\MigrationWithFollowUpInterface
- 8.9.x core/modules/migrate_drupal/src/Plugin/MigrationWithFollowUpInterface.php \Drupal\migrate_drupal\Plugin\MigrationWithFollowUpInterface
- 11.x core/modules/migrate_drupal/src/Plugin/MigrationWithFollowUpInterface.php \Drupal\migrate_drupal\Plugin\MigrationWithFollowUpInterface
Interface for migrations with follow-up migrations.
Some migrations need to be derived and executed after other migrations have been successfully executed. For example, a migration might need to be derived based on previously migrated data. For such a case, the migration dependency system is not enough since all migrations would still be derived before any one of them has been executed.
Those "follow-up" migrations need to be tagged with the "Follow-up migration" tag (or any tag in the "follow_up_migration_tags" configuration) and thus they won't be derived with the other migrations.
To get those follow-up migrations derived at the right time, the migrations on which they depend must implement this interface and generate them in the generateFollowUpMigrations() method.
When the migrations implementing this interface have been successfully executed, the follow-up migrations will then be derived having access to the now migrated data.
Hierarchy
- interface \Drupal\migrate_drupal\Plugin\MigrationWithFollowUpInterface
Expanded class hierarchy of MigrationWithFollowUpInterface
All classes that implement MigrationWithFollowUpInterface
3 files declare their use of MigrationWithFollowUpInterface
- D6NodeTranslation.php in core/
modules/ node/ src/ Plugin/ migrate/ D6NodeTranslation.php - D7NodeTranslation.php in core/
modules/ node/ src/ Plugin/ migrate/ D7NodeTranslation.php - MigrateUpgradeImportBatch.php in core/
modules/ migrate_drupal_ui/ src/ Batch/ MigrateUpgradeImportBatch.php
File
-
core/
modules/ migrate_drupal/ src/ Plugin/ MigrationWithFollowUpInterface.php, line 26
Namespace
Drupal\migrate_drupal\PluginView source
interface MigrationWithFollowUpInterface {
/**
* Generates follow-up migrations.
*
* When the migration implementing this interface has been successfully
* executed, this method will be used to generate the follow-up migrations
* which depends on the now migrated data.
*
* @return \Drupal\migrate\Plugin\MigrationInterface[]
* The follow-up migrations.
*/
public function generateFollowUpMigrations();
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overrides |
---|---|---|---|---|
MigrationWithFollowUpInterface::generateFollowUpMigrations | public | function | Generates follow-up migrations. | 2 |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.