d7_field_instance_widget_settings.yml 1.52 KB
Newer Older
1
id: d7_field_instance_widget_settings
2
label: Field instance widget configuration
3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
migration_tags:
  - Drupal 7
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
      migration: d7_field
      source:
        - field_name
19
        - entity_type
20 21 22
    -
      plugin: extract
      index:
23
        - 0
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46
    -
      plugin: skip_on_empty
      method: row
  bundle: bundle
  form_mode: 'constants/form_mode'
  field_name: field_name
  entity_type: entity_type
  'options/weight': 'widget/weight'
  'options/type':
    type:
      plugin: static_map
      bypass: true
      source: 'widget/type'
      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
47
        taxonomy_autocomplete: entity_reference_autocomplete
48 49 50 51 52 53 54 55 56 57 58
  'options/settings':
    plugin: field_instance_widget_settings
    source:
      - 'widget/type'
      - widget_settings
  'options/third_party_settings': 'constants/third_party_settings'
destination:
  plugin: component_entity_form_display
migration_dependencies:
  required:
    - d7_field_instance