Mercurial > hg > isophonics-drupal-site
comparison core/modules/migrate_drupal/src/Plugin/MigrateFieldInterface.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children | 129ea1e6d783 |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\migrate_drupal\Plugin; | |
4 | |
5 use Drupal\Component\Plugin\PluginInspectionInterface; | |
6 use Drupal\migrate\Plugin\MigrationInterface; | |
7 use Drupal\migrate\Row; | |
8 | |
9 /** | |
10 * Provides an interface for all field type plugins. | |
11 */ | |
12 interface MigrateFieldInterface extends PluginInspectionInterface { | |
13 | |
14 /** | |
15 * Apply any custom processing to the field migration. | |
16 * | |
17 * @param \Drupal\migrate\Plugin\MigrationInterface $migration | |
18 * The migration entity. | |
19 */ | |
20 public function processField(MigrationInterface $migration); | |
21 | |
22 /** | |
23 * Apply any custom processing to the field instance migration. | |
24 * | |
25 * @param \Drupal\migrate\Plugin\MigrationInterface $migration | |
26 * The migration entity. | |
27 */ | |
28 public function processFieldInstance(MigrationInterface $migration); | |
29 | |
30 /** | |
31 * Apply any custom processing to the field widget migration. | |
32 * | |
33 * @param \Drupal\migrate\Plugin\MigrationInterface $migration | |
34 * The migration entity. | |
35 */ | |
36 public function processFieldWidget(MigrationInterface $migration); | |
37 | |
38 /** | |
39 * Apply any custom processing to the field formatter migration. | |
40 * | |
41 * @param \Drupal\migrate\Plugin\MigrationInterface $migration | |
42 * The migration entity. | |
43 */ | |
44 public function processFieldFormatter(MigrationInterface $migration); | |
45 | |
46 /** | |
47 * Get the field formatter type from the source. | |
48 * | |
49 * @param \Drupal\migrate\Row $row | |
50 * The field being migrated. | |
51 * | |
52 * @return string | |
53 * The field formatter type. | |
54 */ | |
55 public function getFieldFormatterType(Row $row); | |
56 | |
57 /** | |
58 * Get a map between D6 formatters and D8 formatters for this field type. | |
59 * | |
60 * This is used by static::processFieldFormatter() in the base class. | |
61 * | |
62 * @return array | |
63 * The keys are D6 formatters and the values are D8 formatters. | |
64 */ | |
65 public function getFieldFormatterMap(); | |
66 | |
67 /** | |
68 * Get the field widget type from the source. | |
69 * | |
70 * @param \Drupal\migrate\Row $row | |
71 * The field being migrated. | |
72 * | |
73 * @return string | |
74 * The field widget type. | |
75 */ | |
76 public function getFieldWidgetType(Row $row); | |
77 | |
78 /** | |
79 * Get a map between D6 and D8 widgets for this field type. | |
80 * | |
81 * @return array | |
82 * The keys are D6 field widget types and the values D8 widgets. | |
83 */ | |
84 public function getFieldWidgetMap(); | |
85 | |
86 /** | |
87 * Apply any custom processing to the field bundle migrations. | |
88 * | |
89 * @param \Drupal\migrate\Plugin\MigrationInterface $migration | |
90 * The migration entity. | |
91 * @param string $field_name | |
92 * The field name we're processing the value for. | |
93 * @param array $data | |
94 * The array of field data from FieldValues::fieldData(). | |
95 */ | |
96 public function processFieldValues(MigrationInterface $migration, $field_name, $data); | |
97 | |
98 /** | |
99 * Computes the destination type of a migrated field. | |
100 * | |
101 * @param \Drupal\migrate\Row $row | |
102 * The field being migrated. | |
103 * | |
104 * @return string | |
105 * The destination field type. | |
106 */ | |
107 public function getFieldType(Row $row); | |
108 | |
109 } |