MigrateField
class MigrateField extends Plugin (View source)
Defines a field plugin annotation object.
Field plugins are responsible for handling the migration of custom fields (provided by Field API in Drupal 7) to Drupal 8. They are allowed to alter fieldable entity migrations when these migrations are being generated, and can compute destination field types for individual fields during the actual migration process.
Plugin Namespace: Plugin\migrate\field
Properties
| protected array | $definition | The plugin definition read from the class annotation. |
from Plugin |
| string | $id | The plugin ID. |
|
| string[] | $type_map | Map of D6 and D7 field types to D8 field type plugin IDs. |
|
| int[] | $core | The Drupal core version(s) this plugin applies to. |
|
| string | $source_module | Identifies the system providing the data the field plugin will read. |
|
| string | $destination_module | Identifies the system handling the data the destination plugin will write. |
|
| int | $weight | The weight of this plugin relative to other plugins. |
Methods
Constructs a Plugin object.
Details
__construct($values)
Constructs a Plugin object.
Builds up the plugin definition and invokes the get() method for any classed annotations that were used.
in
Plugin at line 54
protected array
parse(array $values)
Parses an annotation into its definition.
in
Plugin at line 73
get()
Gets the value of an annotation.
in
Plugin at line 80
string
getProvider()
Gets the name of the provider of the annotated class.
in
Plugin at line 87
setProvider(string $provider)
Sets the name of the provider of the annotated class.
in
Plugin at line 94
string
getId()
Gets the unique ID for this annotated class.
string
getClass()
Gets the class of the annotated class.
setClass(string $class)
Sets the class of the annotated class.