9bc7af6c6d76776338bc156c0d936106263538a6
[yaffs-website] / web / core / modules / color / migrations / d7_color.yml
1 id: d7_color
2 label: Color
3 migration_tags:
4   - Drupal 7
5   - Configuration
6 source:
7   plugin: d7_color
8   constants:
9     config_prefix: 'color.theme.'
10 process:
11   # Skip if theme not installed on destination.
12   theme_installed:
13     plugin: skip_on_empty
14     source: theme_installed
15     method: row
16   element_name:
17     -
18       plugin: explode
19       source: name
20       delimiter: _
21     -
22       plugin: extract
23       index:
24         - 2
25   # Skip if the variable name ends in 'screenshot'.
26   screenshot:
27     -
28       plugin: static_map
29       source: '@element_name'
30       bypass: true
31       map:
32         screenshot: false
33     -
34       plugin: skip_on_empty
35       method: row
36   # Build the configuration name from the variable name, i.e.
37   # 'color_themename_element' becomes 'color.theme.themename'
38   theme_name:
39     -
40       plugin: explode
41       source: name
42       delimiter: _
43     -
44       plugin: extract
45       index:
46         - 1
47   configuration_name:
48     plugin: concat
49     source:
50       - constants/config_prefix
51       - '@theme_name'
52   value: value
53 destination:
54   plugin: color