--- /dev/null
+id: d7_color
+label: Color
+migration_tags:
+ - Drupal 7
+ - Configuration
+source:
+ plugin: d7_color
+ constants:
+ config_prefix: 'color.theme.'
+process:
+ # Skip if theme not installed on destination.
+ theme_installed:
+ plugin: skip_on_empty
+ source: theme_installed
+ method: row
+ element_name:
+ -
+ plugin: explode
+ source: name
+ delimiter: _
+ -
+ plugin: extract
+ index:
+ - 2
+ # Skip if the variable name ends in 'screenshot'.
+ screenshot:
+ -
+ plugin: static_map
+ source: '@element_name'
+ bypass: true
+ map:
+ screenshot: false
+ -
+ plugin: skip_on_empty
+ method: row
+ # Build the configuration name from the variable name, i.e.
+ # 'color_themename_element' becomes 'color.theme.themename'
+ theme_name:
+ -
+ plugin: explode
+ source: name
+ delimiter: _
+ -
+ plugin: extract
+ index:
+ - 1
+ configuration_name:
+ plugin: concat
+ source:
+ - constants/config_prefix
+ - '@theme_name'
+ value: value
+destination:
+ plugin: color