comparison core/modules/migrate_drupal/src/FieldDiscoveryInterface.php @ 5:12f9dff5fda9 tip

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