From 4726d028e6f8bb48dd184857a7442e9e4317080f Mon Sep 17 00:00:00 2001 From: Mauricio Dinarte Date: Wed, 4 Dec 2024 10:12:02 -0600 Subject: [PATCH] Add upgrade_d7_field_instance configuration migration Copied from ref_migrations folder --- .../migrations/upgrade_d7_field_instance.yml | 130 ++++++++++++++++++ 1 file changed, 130 insertions(+) create mode 100644 drupal10/web/modules/custom/tag1_migration/tag1_migration_config/migrations/upgrade_d7_field_instance.yml diff --git a/drupal10/web/modules/custom/tag1_migration/tag1_migration_config/migrations/upgrade_d7_field_instance.yml b/drupal10/web/modules/custom/tag1_migration/tag1_migration_config/migrations/upgrade_d7_field_instance.yml new file mode 100644 index 0000000..d1a0f2c --- /dev/null +++ b/drupal10/web/modules/custom/tag1_migration/tag1_migration_config/migrations/upgrade_d7_field_instance.yml @@ -0,0 +1,130 @@ +uuid: 4e8c4b5e-989b-4830-a9d6-ed35292d2291 +langcode: en +status: true +dependencies: { } +id: upgrade_d7_field_instance +class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration +field_plugin_method: alterFieldInstanceMigration +cck_plugin_method: null +migration_tags: + - 'Drupal 7' + - Configuration +migration_group: migrate_drupal_7 +label: 'Field instance configuration' +source: + plugin: d7_field_instance + constants: + status: true + comment_node: comment_node_ +process: + type: + - + plugin: process_field + source: type + method: getFieldType + entity_type: + - + plugin: get + source: entity_type + - + plugin: static_map + map: + field_collection_item: paragraph + paragraphs_item: paragraph + bypass: true + field_name: + - + plugin: get + source: field_name + bundle_mapped: + - + plugin: static_map + source: bundle + bypass: true + map: + comment_node_forum: comment_forum + - + plugin: paragraphs_process_on_value + source_value: entity_type + expected_value: field_collection_item + process: + plugin: paragraphs_strip_field_prefix + _comment_type: + - + plugin: explode + source: bundle + delimiter: comment_node_ + - + plugin: extract + index: + - 1 + default: false + - + plugin: skip_on_empty + method: process + - + plugin: migration_lookup + migration: { } + bundle: + - + plugin: field_bundle + source: + - entity_type + - '@bundle_mapped' + label: + - + plugin: get + source: label + description: + - + plugin: get + source: description + required: + - + plugin: get + source: required + status: + - + plugin: get + source: constants/status + allowed_values: + - + plugin: sub_process + source: allowed_vid + process: + - + plugin: migration_lookup + migration: upgrade_d7_taxonomy_vocabulary + source: vid + settings: + 0: + plugin: d7_field_instance_settings + source: + - settings + - widget + - field_definition + field_collection: + plugin: field_collection_field_instance_settings + default_value_function: + - + plugin: get + source: '' + default_value: + - + plugin: d7_field_instance_defaults + source: + - default_value + - widget + translatable: + - + plugin: get + source: translatable +destination: + plugin: 'entity:field_config' +migration_dependencies: + required: + - upgrade_d7_field + optional: + - upgrade_d7_node_type + - upgrade_d7_taxonomy_vocabulary + - upgrade_d7_field_collection_type