Pull merge.
[yaffs-website] / web / core / modules / comment / migrations / d6_comment_field_instance.yml
1 id: d6_comment_field_instance
2 label: Comment field instance configuration
3 migration_tags:
4   - Drupal 6
5   - Configuration
6 source:
7   plugin: d6_node_type
8   constants:
9     entity_type: node
10     label: Comments
11     required: true
12 process:
13   entity_type: 'constants/entity_type'
14   label: 'constants/label'
15   required: 'constants/required'
16   field_name:
17     -
18       plugin: migration_lookup
19       source: type
20       migration: d6_comment_type
21     -
22       plugin: skip_on_empty
23       method: row
24   bundle: type
25   'default_value/0/status':
26     # We're using static_map instead of default_value otherwise if the source
27     # is 0, the default value of 1 would be used.
28     plugin: static_map
29     source: comment
30     map:
31       0: 0
32       1: 1
33       2: 2
34     default_value: 2
35   'settings/default_mode':
36     plugin: static_map
37     source: comment_default_mode
38     map:
39       # COMMENT_MODE_FLAT_COLLAPSED --> COMMENT_MODE_FLAT
40       1: 0
41       # COMMENT_MODE_FLAT_EXPANDED --> COMMENT_MODE_FLAT
42       2: 0
43       # COMMENT_MODE_THREADED_COLLAPSED --> COMMENT_MODE_THREADED
44       3: 1
45       # COMMENT_MODE_THREADED_EXPANDED --> COMMENT_MODE_THREADED
46       4: 1
47     default_value: 1
48   'settings/per_page':
49     plugin: default_value
50     source: comment_default_per_page
51     default_value: 50
52   'settings/anonymous':
53     plugin: default_value
54     source: comment_anonymous
55     default_value: 0
56   'settings/form_location':
57     plugin: default_value
58     source: comment_form_location
59     default_value: 0
60   'settings/preview':
61     # We're using static_map instead of default_value otherwise if the source
62     # is 0, the default value of 1 would be used.
63     plugin: static_map
64     source: comment_preview
65     map:
66       0: 0
67       1: 1
68     default_value: 1
69 destination:
70   plugin: entity:field_config
71 migration_dependencies:
72   required:
73     - d6_node_type
74     - d6_comment_field