3 namespace Drupal\migrate_drupal\Plugin;
6 * Interface for migrations with follow-up migrations.
8 * Some migrations need to be derived and executed after other migrations have
9 * been successfully executed. For example, a migration might need to be derived
10 * based on previously migrated data. For such a case, the migration dependency
11 * system is not enough since all migrations would still be derived before any
12 * one of them has been executed.
14 * Those "follow-up" migrations need to be tagged with the "Follow-up migration"
15 * tag (or any tag in the "follow_up_migration_tags" configuration) and thus
16 * they won't be derived with the other migrations.
18 * To get those follow-up migrations derived at the right time, the migrations
19 * on which they depend must implement this interface and generate them in the
20 * generateFollowUpMigrations() method.
22 * When the migrations implementing this interface have been successfully
23 * executed, the follow-up migrations will then be derived having access to the
26 interface MigrationWithFollowUpInterface {
29 * Generates follow-up migrations.
31 * When the migration implementing this interface has been successfully
32 * executed, this method will be used to generate the follow-up migrations
33 * which depends on the now migrated data.
35 * @return \Drupal\migrate\Plugin\MigrationInterface[]
36 * The follow-up migrations.
38 public function generateFollowUpMigrations();