3 namespace Drupal\migrate_drupal\Plugin;
5 use Drupal\Component\Plugin\PluginInspectionInterface;
6 use Drupal\migrate\Plugin\MigrationInterface;
7 use Drupal\migrate\Row;
10 * Provides an interface for all field type plugins.
12 interface MigrateFieldInterface extends PluginInspectionInterface {
15 * Apply any custom processing to the field migration.
17 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
18 * The migration entity.
20 public function processField(MigrationInterface $migration);
23 * Apply any custom processing to the field instance migration.
25 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
26 * The migration entity.
28 public function processFieldInstance(MigrationInterface $migration);
31 * Apply any custom processing to the field widget migration.
33 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
34 * The migration entity.
36 public function processFieldWidget(MigrationInterface $migration);
39 * Apply any custom processing to the field formatter migration.
41 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
42 * The migration entity.
44 public function processFieldFormatter(MigrationInterface $migration);
47 * Get a map between D6 formatters and D8 formatters for this field type.
49 * This is used by static::processFieldFormatter() in the base class.
52 * The keys are D6 formatters and the values are D8 formatters.
54 public function getFieldFormatterMap();
57 * Get a map between D6 and D8 widgets for this field type.
60 * The keys are D6 field widget types and the values D8 widgets.
62 public function getFieldWidgetMap();
65 * Apply any custom processing to the field bundle migrations.
67 * @param \Drupal\migrate\Plugin\MigrationInterface $migration
68 * The migration entity.
69 * @param string $field_name
70 * The field name we're processing the value for.
72 * The array of field data from FieldValues::fieldData().
74 public function processFieldValues(MigrationInterface $migration, $field_name, $data);
77 * Computes the destination type of a migrated field.
79 * @param \Drupal\migrate\Row $row
80 * The field being migrated.
83 * The destination field type.
85 public function getFieldType(Row $row);