126fd29a20b05af3d33dcb61f3403e598bdb85c4
[yaffs-website] / web / core / modules / field / migration_templates / d7_field_formatter_settings.yml
1 id: d7_field_formatter_settings
2 label: Field formatter configuration
3 migration_tags:
4   - Drupal 7
5 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration
6 cck_plugin_method: processFieldFormatter
7 source:
8   plugin: d7_field_instance_per_view_mode
9   constants:
10     third_party_settings: { }
11 process:
12   # We skip field types that don't exist because they weren't migrated by the
13   # field migration.
14   field_type_exists:
15     -
16       plugin: migration_lookup
17       migration: d7_field
18       source:
19         - field_name
20         - entity_type
21     -
22       plugin: extract
23       index:
24         - 0
25     -
26       plugin: skip_on_empty
27       method: row
28   entity_type: entity_type
29   bundle: bundle
30   view_mode:
31     -
32       plugin: migration_lookup
33       migration: d7_view_modes
34       source:
35         - entity_type
36         - view_mode
37     -
38       plugin: extract
39       index:
40         - 1
41     -
42       plugin: static_map
43       bypass: true
44       map:
45         full: default
46   field_name: field_name
47   "options/label": label
48   "options/weight": weight
49   # The formatter to use.
50   "options/type":
51     -
52       plugin: static_map
53       bypass: true
54       source: formatter_type
55       map:
56         date_default: datetime_default
57         email_default: email_mailto
58         # 0 should cause the row to be skipped by the next plugin in the
59         # pipeline.
60         hidden: 0
61         link_default: link
62         phone: basic_string
63         taxonomy_term_reference_link: entity_reference_label
64         entityreference_label: entity_reference_label
65         entityreference_entity_id: entity_reference_entity_id
66         entityreference_entity_view: entity_reference_entity_view
67     -
68       plugin: skip_on_empty
69       method: row
70   "options/settings":
71     plugin: default_value
72     source: settings
73     default_value: []
74   "options/third_party_settings": 'constants/third_party_settings'
75 destination:
76   plugin: component_entity_display
77 migration_dependencies:
78   required:
79     - d7_field_instance
80     - d7_view_modes