Version 1
[yaffs-website] / web / core / modules / field / migration_templates / d7_field_instance_widget_settings.yml
1 id: d7_field_instance_widget_settings
2 label: Field instance widget configuration
3 migration_tags:
4   - Drupal 7
5 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration
6 cck_plugin_method: processFieldWidget
7 source:
8   plugin: d7_field_instance_per_form_display
9   constants:
10     form_mode: default
11     third_party_settings: { }
12 process:
13   # We skip field types that don't exist because they weren't migrated by the
14   # field migration.
15   field_type_exists:
16     -
17       plugin: migration_lookup
18       migration: d7_field
19       source:
20         - field_name
21         - entity_type
22     -
23       plugin: extract
24       index:
25         - 0
26     -
27       plugin: skip_on_empty
28       method: row
29   bundle: bundle
30   form_mode: 'constants/form_mode'
31   field_name: field_name
32   entity_type: entity_type
33   'options/weight': 'widget/weight'
34   'options/type':
35     type:
36       plugin: static_map
37       bypass: true
38       source: 'widget/type'
39       map:
40         link_field: link_default
41         email_textfield: email_default
42         date_select: datetime_default
43         date_text: datetime_default
44         date_popup: datetime_default
45         media_generic: file_generic
46         phone_textfield: telephone_default
47         options_onoff: boolean_checkbox
48         entityreference_autocomplete: entity_reference_autocomplete
49         entityreference_autocomplete_tags: entity_reference_autocomplete_tags
50         taxonomy_autocomplete: entity_reference_autocomplete
51   'options/settings':
52     plugin: field_instance_widget_settings
53     source:
54       - 'widget/type'
55       - widget_settings
56   'options/third_party_settings': 'constants/third_party_settings'
57 destination:
58   plugin: component_entity_form_display
59 migration_dependencies:
60   required:
61     - d7_field_instance