You are here

d7_field_instance_widget_settings.yml in Drupal 8

Same filename and directory in other branches
  1. 9 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. plugin: static_map
  35. source: bundle
  36. bypass: true
  37. map:
  38. comment_node_forum: comment_forum
  39. form_mode: 'constants/form_mode'
  40. field_name: field_name
  41. entity_type: entity_type
  42. 'options/weight': 'widget/weight'
  43. widget_type:
  44. plugin: process_field
  45. source: type
  46. method: getFieldWidgetType
  47. 'options/type':
  48. type:
  49. plugin: static_map
  50. bypass: true
  51. source: '@widget_type'
  52. map:
  53. link_field: link_default
  54. email_textfield: email_default
  55. date_select: datetime_default
  56. date_text: datetime_default
  57. date_popup: datetime_default
  58. media_generic: file_generic
  59. phone_textfield: telephone_default
  60. options_onoff: boolean_checkbox
  61. entityreference_autocomplete: entity_reference_autocomplete
  62. entityreference_autocomplete_tags: entity_reference_autocomplete_tags
  63. taxonomy_autocomplete: entity_reference_autocomplete
  64. 'options/settings':
  65. plugin: field_instance_widget_settings
  66. source:
  67. - 'widget/type'
  68. - 'widget/settings'
  69. 'options/third_party_settings': 'constants/third_party_settings'
  70. destination:
  71. plugin: component_entity_form_display
  72. migration_dependencies:
  73. required:
  74. - d7_field_instance