3 namespace Drupal\migrate_drupal\Annotation;
5 use Drupal\Component\Annotation\Plugin;
8 * Defines a field plugin annotation object.
10 * Field plugins are responsible for handling the migration of custom fields
11 * (provided by CCK in Drupal 6 and Field API in Drupal 7) to Drupal 8. They are
12 * allowed to alter fieldable entity migrations when these migrations are being
13 * generated, and can compute destination field types for individual fields
14 * during the actual migration process.
16 * Plugin Namespace: Plugin\migrate\field
20 class MigrateField extends Plugin {
25 public function __construct($values) {
26 parent::__construct($values);
27 // Provide default value for core property, in case it's missing.
28 if (empty($this->definition['core'])) {
29 $this->definition['core'] = [6];
41 * Map of D6 and D7 field types to D8 field type plugin IDs.
45 public $type_map = [];
48 * The Drupal core version(s) this plugin applies to.
55 * Identifies the system providing the data the field plugin will read.
57 * The source_module is expected to be the name of a Drupal module that must
58 * must be installed in the source database.
62 public $source_module;
65 * Identifies the system handling the data the destination plugin will write.
67 * The destination_module is expected to be the name of a Drupal module on the
68 * destination site that must be installed.
72 public $destination_module;