Chris@18
|
1 <?php
|
Chris@18
|
2
|
Chris@18
|
3 namespace Drupal\migrate_drupal;
|
Chris@18
|
4
|
Chris@18
|
5 use Drupal\migrate\Plugin\MigrationInterface;
|
Chris@18
|
6
|
Chris@18
|
7 /**
|
Chris@18
|
8 * Provides field discovery for Drupal 6 & 7 migrations.
|
Chris@18
|
9 */
|
Chris@18
|
10 interface FieldDiscoveryInterface {
|
Chris@18
|
11
|
Chris@18
|
12 const DRUPAL_6 = '6';
|
Chris@18
|
13
|
Chris@18
|
14 const DRUPAL_7 = '7';
|
Chris@18
|
15
|
Chris@18
|
16 /**
|
Chris@18
|
17 * Adds the field processes to a migration.
|
Chris@18
|
18 *
|
Chris@18
|
19 * This method is used in field migrations to execute the migration process
|
Chris@18
|
20 * alter method specified by the 'field_plugin_method' key of the migration
|
Chris@18
|
21 * for all field plugins applicable to this Drupal to Drupal migration. This
|
Chris@18
|
22 * method is used internally for field, field instance, widget, and formatter
|
Chris@18
|
23 * migrations to allow field plugins to alter the process for these
|
Chris@18
|
24 * migrations.
|
Chris@18
|
25 *
|
Chris@18
|
26 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
|
Chris@18
|
27 * The migration to add process plugins to.
|
Chris@18
|
28 *
|
Chris@18
|
29 * @throws \InvalidArgumentException
|
Chris@18
|
30 *
|
Chris@18
|
31 * @internal
|
Chris@18
|
32 */
|
Chris@18
|
33 public function addAllFieldProcesses(MigrationInterface $migration);
|
Chris@18
|
34
|
Chris@18
|
35 /**
|
Chris@18
|
36 * Adds the field processes for an entity to a migration.
|
Chris@18
|
37 *
|
Chris@18
|
38 * This method is used in field migrations to execute the migration process
|
Chris@18
|
39 * alter method specified by the 'field_plugin_method' key of the migration
|
Chris@18
|
40 * for all field plugins applicable to this Drupal to Drupal migration. This
|
Chris@18
|
41 * method is used internally for field, field instance, widget, and formatter
|
Chris@18
|
42 * migrations to allow field plugins to alter the process for these
|
Chris@18
|
43 * migrations.
|
Chris@18
|
44 *
|
Chris@18
|
45 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
|
Chris@18
|
46 * The migration to add processes to.
|
Chris@18
|
47 * @param string $entity_type_id
|
Chris@18
|
48 * The legacy entity type to add processes for.
|
Chris@18
|
49 *
|
Chris@18
|
50 * @throws \InvalidArgumentException
|
Chris@18
|
51 */
|
Chris@18
|
52 public function addEntityFieldProcesses(MigrationInterface $migration, $entity_type_id);
|
Chris@18
|
53
|
Chris@18
|
54 /**
|
Chris@18
|
55 * Adds the field processes for a bundle to a migration.
|
Chris@18
|
56 *
|
Chris@18
|
57 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
|
Chris@18
|
58 * The migration to add processes to.
|
Chris@18
|
59 * @param string $entity_type_id
|
Chris@18
|
60 * The legacy entity type to add processes for.
|
Chris@18
|
61 * @param string $bundle
|
Chris@18
|
62 * The legacy bundle (or content_type) to add processes for.
|
Chris@18
|
63 *
|
Chris@18
|
64 * @throws \InvalidArgumentException
|
Chris@18
|
65 */
|
Chris@18
|
66 public function addBundleFieldProcesses(MigrationInterface $migration, $entity_type_id, $bundle);
|
Chris@18
|
67
|
Chris@18
|
68 }
|