Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / comment / migrations / d7_comment_type.yml
diff --git a/web/core/modules/comment/migrations/d7_comment_type.yml b/web/core/modules/comment/migrations/d7_comment_type.yml
new file mode 100644 (file)
index 0000000..ad34c4f
--- /dev/null
@@ -0,0 +1,34 @@
+id: d7_comment_type
+label: Comment type
+migration_tags:
+  - Drupal 7
+  - Configuration
+source:
+  plugin: d7_node_type
+  constants:
+    entity_type: node
+    id_prefix: 'comment_node_'
+    label_suffix: 'comment'
+process:
+  target_entity_type_id: 'constants/entity_type'
+  id:
+    -
+      plugin: concat
+      source:
+        - 'constants/id_prefix'
+        - type
+    -
+      plugin: static_map
+      bypass: true
+      # The Forum module provides its own comment type (comment_forum), which we
+      # want to reuse if it exists.
+      map:
+        comment_node_forum: comment_forum
+  label:
+    plugin: concat
+    source:
+      - name
+      - 'constants/label_suffix'
+    delimiter: ' '
+destination:
+  plugin: entity:comment_type