Verified Commit 8e51b463 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3421020 by godotislate, mohit_aghera, quietone: Convert MigrateField...

Issue #3421020 by godotislate, mohit_aghera, quietone: Convert MigrateField plugin discovery to attributes
parent c1209497
Loading
Loading
Loading
Loading
Loading
+10 −11
Changes for core/modules/field/src/Plugin/migrate/field/Email.php: 10 added lines, 11 removed lines.
Original line number Diff line number Diff line
@@ -3,23 +3,22 @@
namespace Drupal\field\Plugin\migrate\field;

use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Attribute\MigrateField;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;

// cspell:ignore spamspan

/**
 * MigrateField Plugin for Drupal 6 and 7 email fields.
 *
 * @MigrateField(
 *   id = "email",
 *   core = {6,7},
 *   type_map = {
 *     "email" = "email"
 *   },
 *   source_module = "email",
 *   destination_module = "core"
 * )
 */
#[MigrateField(
  id: 'email',
  core: [6, 7],
  type_map: [
    'email' => 'email',
  ],
  source_module: 'email',
  destination_module: 'core',
)]
class Email extends FieldPluginBase {

  /**
+10 −10
Changes for core/modules/field/src/Plugin/migrate/field/d7/EntityReference.php: 10 added lines, 10 removed lines.
Original line number Diff line number Diff line
@@ -2,23 +2,23 @@

namespace Drupal\field\Plugin\migrate\field\d7;

use Drupal\migrate_drupal\Attribute\MigrateField;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;

// cspell:ignore entityreference

/**
 * MigrateField plugin for Drupal 7 entity_reference fields.
 *
 * @MigrateField(
 *   id = "entityreference",
 *   type_map = {
 *     "entityreference" = "entity_reference",
 *   },
 *   core = {7},
 *   source_module = "entityreference",
 *   destination_module = "core"
 * )
 */
#[MigrateField(
  id: 'entityreference',
  core: [7],
  type_map: [
    'entityreference' => 'entity_reference',
  ],
  source_module: 'entityreference',
  destination_module: 'core',
)]
class EntityReference extends FieldPluginBase {

  /**
+12 −12
Changes for core/modules/field/src/Plugin/migrate/field/d7/NumberField.php: 12 added lines, 12 removed lines.
Original line number Diff line number Diff line
@@ -2,21 +2,21 @@

namespace Drupal\field\Plugin\migrate\field\d7;

use Drupal\migrate_drupal\Attribute\MigrateField;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;

/**
 * MigrateField plugin for Drupal 7 number fields.
 *
 * @MigrateField(
 *   id = "number_default",
 *   type_map = {
 *     "number_integer" = "integer",
 *     "number_decimal" = "decimal",
 *     "number_float" = "float",
 *   },
 *   core = {7},
 *   source_module = "number",
 *   destination_module = "core"
 * )
 */
#[MigrateField(
  id: 'number_default',
  core: [7],
  type_map: [
    'number_integer' => 'integer',
    'number_decimal' => 'decimal',
    'number_float' => 'float',
  ],
  source_module: 'number',
  destination_module: 'core',
)]
class NumberField extends FieldPluginBase {}
+8 −7
Changes for core/modules/file/src/Plugin/migrate/field/d6/FileField.php: 8 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -4,18 +4,19 @@

use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate\Row;
use Drupal\migrate_drupal\Attribute\MigrateField;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;

// cspell:ignore filefield imagefield imagelink nodelink

/**
 * @MigrateField(
 *   id = "filefield",
 *   core = {6},
 *   source_module = "filefield",
 *   destination_module = "file"
 * )
 * MigrateField Plugin for Drupal 6 file fields.
 */
#[MigrateField(
  id: 'filefield',
  core: [6],
  source_module: 'filefield',
  destination_module: 'file',
)]
class FileField extends FieldPluginBase {

  /**
+8 −7
Changes for core/modules/file/src/Plugin/migrate/field/d7/FileField.php: 8 added lines, 7 removed lines.
Original line number Diff line number Diff line
@@ -4,17 +4,18 @@

use Drupal\file\Plugin\migrate\field\d6\FileField as D6FileField;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Attribute\MigrateField;

// cspell:ignore filefield

/**
 * @MigrateField(
 *   id = "file",
 *   core = {7},
 *   source_module = "file",
 *   destination_module = "file"
 * )
 * MigrateField Plugin for Drupal 7 file fields.
 */
#[MigrateField(
  id: 'file',
  core: [7],
  source_module: 'file',
  destination_module: 'file',
)]
class FileField extends D6FileField {

  /**
Loading