Commit 8ec06ce9 authored by catch's avatar catch

Issue #2901851 by maxocub: Replace the static map in the d7_field migration by field plugins

parent 8189fadc
<?php
namespace Drupal\Core\Field\Plugin\migrate\field\d7;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
/**
* @MigrateField(
* id = "entityreference",
* type_map = {
* "entityreference" = "entity_reference",
* },
* core = {7}
* )
*/
class EntityReference extends FieldPluginBase {}
<?php
namespace Drupal\Core\Field\Plugin\migrate\field\d7;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
/**
* @MigrateField(
* id = "number_default",
* type_map = {
* "number_integer" = "integer",
* "number_decimal" = "decimal",
* "number_float" = "float",
* },
* core = {7}
* )
*/
class NumberField extends FieldPluginBase {}
......@@ -17,24 +17,6 @@ process:
type:
plugin: field_type
source: type
map:
date: datetime
datestamp: datetime
datetime: datetime
email: email
entityreference: entity_reference
file: file
image: image
link_field: link
list_boolean: boolean
list_integer: list_integer
list_text: list_string
number_integer: integer
number_decimal: decimal
number_float: float
phone: telephone
text_long: text_long
text_with_summary: text_with_summary
# Translatable is not migrated and the Drupal 8 default of true is used.
# If translatable is false in field storage then the field can not be
# set to translatable via the UI.
......
<?php
namespace Drupal\options\Plugin\migrate\field\d7;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
/**
* @MigrateField(
* id = "list",
* type_map = {
* "list_boolean" = "boolean",
* "list_integer" = "list_integer",
* "list_text" = "list_string",
* },
* core = {7}
* )
*/
class ListField extends FieldPluginBase {}
<?php
namespace Drupal\telephone\Plugin\migrate\field\d7;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
/**
* @MigrateField(
* id = "phone",
* type_map = {
* "phone" = "telephone",
* },
* core = {7}
* )
*/
class PhoneField extends FieldPluginBase {}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment