You are here

d7_field_instance_widget_settings.yml in Drupal 10

core/modules/field/migrations/d7_field_instance_widget_settings.yml

File

core/modules/field/migrations/d7_field_instance_widget_settings.yml
View source
  1. # cspell:ignore entityreference
  2. id: d7_field_instance_widget_settings
  3. label: Field instance widget configuration
  4. migration_tags:
  5. - Drupal 7
  6. - Configuration
  7. class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration
  8. field_plugin_method: alterFieldWidgetMigration
  9. source:
  10. plugin: d7_field_instance_per_form_display
  11. constants:
  12. form_mode: default
  13. third_party_settings: { }
  14. process:
  15. # We skip field types that don't exist because they weren't migrated by the
  16. # field migration.
  17. field_type_exists:
  18. -
  19. plugin: migration_lookup
  20. migration: d7_field
  21. source:
  22. - field_name
  23. - entity_type
  24. -
  25. plugin: extract
  26. index:
  27. - 0
  28. -
  29. plugin: skip_on_empty
  30. method: row
  31. # The bundle needs to be statically mapped in order to support comment types
  32. # that might already exist before this migration is run. See
  33. # d7_comment_type.yml for more information.
  34. bundle:
  35. -
  36. plugin: migration_lookup
  37. migration: d7_field_instance
  38. source:
  39. - entity_type
  40. - bundle
  41. - field_name
  42. -
  43. plugin: extract
  44. index:
  45. - 1
  46. form_mode: 'constants/form_mode'
  47. field_name: field_name
  48. entity_type: entity_type
  49. 'options/weight': 'widget/weight'
  50. widget_type:
  51. plugin: process_field
  52. source: type
  53. method: getFieldWidgetType
  54. 'options/type':
  55. type:
  56. plugin: static_map
  57. bypass: true
  58. source: '@widget_type'
  59. map:
  60. link_field: link_default
  61. email_textfield: email_default
  62. date_select: datetime_default
  63. date_text: datetime_default
  64. date_popup: datetime_default
  65. media_generic: file_generic
  66. phone_textfield: telephone_default
  67. options_onoff: boolean_checkbox
  68. entityreference_autocomplete: entity_reference_autocomplete
  69. entityreference_autocomplete_tags: entity_reference_autocomplete_tags
  70. taxonomy_autocomplete: entity_reference_autocomplete
  71. 'options/settings':
  72. plugin: field_instance_widget_settings
  73. source:
  74. - 'widget/type'
  75. - 'widget/settings'
  76. 'options/third_party_settings': 'constants/third_party_settings'
  77. destination:
  78. plugin: component_entity_form_display
  79. migration_dependencies:
  80. required:
  81. - d7_field_instance