Commit 4ed7472e authored by Damien McKenna's avatar Damien McKenna Committed by Damien McKenna
Browse files

Issue #3090002 by DamienMcKenna: Rename migrate plugins to follow naming conventions.

parent 0d1d5773
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -35,6 +35,7 @@ Metatag 8.x-1.x-dev, xxxx-xx-xx
#3096936 by DamienMcKenna, thejimbirch, rubyji: Add new tag: Zoom domain
  verification.
#3101288 by chr.fritsch: Fix namespace and imports.
#3090002 by DamienMcKenna: Rename migrate plugins to follow naming conventions.


Metatag 8.x-1.10, 2019-08-29
+6 −6
Original line number Diff line number Diff line
@@ -247,7 +247,7 @@ Two migration processes are supported:

    This is set up in metatag_migration_plugins_alter() and then leverages code
    in metatag_migrate_prepare_row() and
    \Drupal\metatag\Plugin\migrate\process\d7\MetatagD7Entities to do the actual
    \Drupal\metatag\Plugin\migrate\process\d7\MetatagEntities to do the actual
    data migration.

 2. A custom migration using Migrate Plus [3] and possibly Migrate Tools [4].
@@ -259,16 +259,16 @@ Two migration processes are supported:
.......................................
process:
  field_metatag:
    plugin: metatag_d7_entities
    source: pseudo_metatag_d7_entities
    plugin: d7_metatag_entities
    source: pseudo_d7_metatag_entities
.......................................

    The important items are the plugin "metatag_d7_entities" and the source
    value of "pseudo_metatag_d7_entities", if these are not present the
    The important items are the plugin "d7_metatag_entities" and the source
    value of "pseudo_d7_metatag_entities", if these are not present the
    migration will not work as expected.

    This is handled by metatag_migrate_prepare_row() and
    \Drupal\metatag\Plugin\migrate\process\d7\MetatagD7Entities.
    \Drupal\metatag\Plugin\migrate\process\d7\MetatagEntities.


DrupalConsole integration
+3 −3
Original line number Diff line number Diff line
@@ -700,7 +700,7 @@ function metatag_migrate_prepare_row(Row $row, MigrateSourceInterface $source, M
      $value = array_pop($value);
    }

    $row->setSourceProperty('pseudo_metatag_d7_entities', $value);
    $row->setSourceProperty('pseudo_d7_metatag_entities', $value);
  }
}

@@ -768,8 +768,8 @@ function metatag_migration_plugins_alter(array &$migrations) {
        // Metatag-D7's data is handled via a custom process plugin that does
        // the data conversion.
        $migration['process']['field_metatag'] = [
          'plugin' => 'metatag_d7_entities',
          'source' => 'pseudo_metatag_d7_entities',
          'plugin' => 'd7_metatag_entities',
          'source' => 'pseudo_d7_metatag_entities',
        ];

        // List dependencies here so that they are processed first, otherwise
+9 −4
Original line number Diff line number Diff line
# A default migration mapping for Metatag-D7 base fields.
#
# @see Drupal\metatag\Plugin\migrate\source\d7\MetatagField

id: d7_metatag_field
label: Metatag field
migration_tags:
  - Drupal 7
source:
  plugin: d7_metatag_field
  source_module: metatag
  ignore_map: true
  constants:
    status: true
    langcode: und
    field_name: field_metatag
    langcode: und
    type: metatag
    status: true
process:
  entity_type: entity_type
  status: 'constants/status'
  langcode: 'constants/langcode'
  field_name: 'constants/field_name'
  langcode: 'constants/langcode'
  status: 'constants/status'
  type: 'constants/type'
destination:
  plugin: entity:field_storage_config
+11 −2
Original line number Diff line number Diff line
# A default migration mapping for Metatag-D7 field instances.
#
# @see Drupal\metatag\Plugin\migrate\source\d7\MetatagFieldInstance

id: d7_metatag_field_instance
label: Metatag field instance
migration_tags:
@@ -10,14 +14,19 @@ source:
    field_name: field_metatag
    label: Meta tags
process:
  bundle: bundle
  entity_type: entity_type
  field_name: 'constants/field_name'
  bundle: bundle
  label: 'constants/label'
destination:
  plugin: entity:field_config
migration_dependencies:
  required:
    # The base field migration is required before this migration can run.
    - d7_metatag_field

    # @todo Is this accurate? Does it really need the vocabulary migration, or
    # is it more precautionary, that it *might* be needed so it might as well be
    # executed first?
    - d7_node_type
    - d7_taxonomy_vocabulary
Loading