Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / color / migrations / d7_color.yml
diff --git a/web/core/modules/color/migrations/d7_color.yml b/web/core/modules/color/migrations/d7_color.yml
new file mode 100644 (file)
index 0000000..9bc7af6
--- /dev/null
@@ -0,0 +1,54 @@
+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