Newer
Older
Angie Byron
committed
id: d7_field_instance_widget_settings
Angie Byron
committed
label: Field instance widget configuration
Angie Byron
committed
migration_tags:
- Drupal 7
class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration
field_plugin_method: processFieldWidget
Angie Byron
committed
source:
plugin: d7_field_instance_per_form_display
constants:
form_mode: default
third_party_settings: { }
process:
# We skip field types that don't exist because they weren't migrated by the
# field migration.
field_type_exists:
-
plugin: migration_lookup
Angie Byron
committed
migration: d7_field
source:
- field_name
Angie Byron
committed
- entity_type
Angie Byron
committed
-
plugin: extract
index:
Angie Byron
committed
- 0
Angie Byron
committed
-
plugin: skip_on_empty
method: row
Angie Byron
committed
# The bundle needs to be statically mapped in order to support comment types
# that might already exist before this migration is run. See
# d7_comment_type.yml for more information.
bundle:
plugin: static_map
source: bundle
bypass: true
map:
comment_node_forum: comment_forum
Angie Byron
committed
form_mode: 'constants/form_mode'
field_name: field_name
entity_type: entity_type
'options/weight': 'widget/weight'
widget_type:
plugin: process_field
source: type
method: getFieldWidgetType
Angie Byron
committed
'options/type':
type:
plugin: static_map
bypass: true
source: '@widget_type'
Angie Byron
committed
map:
link_field: link_default
email_textfield: email_default
date_select: datetime_default
date_text: datetime_default
date_popup: datetime_default
media_generic: file_generic
phone_textfield: telephone_default
options_onoff: boolean_checkbox
entityreference_autocomplete: entity_reference_autocomplete
entityreference_autocomplete_tags: entity_reference_autocomplete_tags
Angie Byron
committed
taxonomy_autocomplete: entity_reference_autocomplete
Angie Byron
committed
'options/settings':
plugin: field_instance_widget_settings
source:
- 'widget/type'
- 'widget/settings'
Angie Byron
committed
'options/third_party_settings': 'constants/third_party_settings'
destination:
plugin: component_entity_form_display
migration_dependencies:
required:
- d7_field_instance