comparison core/modules/migrate_drupal/src/Plugin/MigrationWithFollowUpInterface.php @ 16:c2387f117808

Routine composer update
author Chris Cannam
date Tue, 10 Jul 2018 15:07:59 +0100
parents
children 129ea1e6d783
comparison
equal deleted inserted replaced
15:e200cb7efeb3 16:c2387f117808
1 <?php
2
3 namespace Drupal\migrate_drupal\Plugin;
4
5 /**
6 * Interface for migrations with follow-up migrations.
7 *
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.
13 *
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.
17 *
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.
21 *
22 * When the migrations implementing this interface have been successfully
23 * executed, the follow-up migrations will then be derived having access to the
24 * now migrated data.
25 */
26 interface MigrationWithFollowUpInterface {
27
28 /**
29 * Generates follow-up migrations.
30 *
31 * When the migration implementing this interface has been succesfully
32 * executed, this method will be used to generate the follow-up migrations
33 * which depends on the now migrated data.
34 *
35 * @return \Drupal\migrate\Plugin\MigrationInterface[]
36 * The follow-up migrations.
37 */
38 public function generateFollowUpMigrations();
39
40 }