You are here

d7_field_instance_widget_settings.yml in Drupal 9

Same filename and directory in other branches
  1. 8 core/modules/field/migrations/d7_field_instance_widget_settings.yml
core/modules/field/migrations/d7_field_instance_widget_settings.yml

File

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