-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmigrate_plus.migration.example_creature_i18n.yml
More file actions
67 lines (66 loc) · 1.83 KB
/
migrate_plus.migration.example_creature_i18n.yml
File metadata and controls
67 lines (66 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
# Migration of "article" node translations from Drupal 7.
#
# This file demonstrates migration of content translated with
# the 'entity_translation' module.
#
# Since a detailed description of many configuration parameters
# has been provided in the 'hybrid_base' and 'hybrid_i18n' migrations,
# they have not been repeated here. Kindly refer to those migrations
# if you are looking for detailed descriptions for various paramters.
# Migration metadata
id: example_creature_i18n
label: Creature translations
migration_group: example_creature
migration_tags:
- node
- article
- d7
# Migration source
source:
plugin: d7_node_entity_translation
node_type: article
# We deal only with translations in this migration.
translations: true
# Specify the database from which data is to be read.
key: drupal_7_entity
# Static values for the migration.
constants:
uid_root: 1
node_article: 'article'
ids:
- nid
- language
# Migration destination
destination:
plugin: 'entity:node'
# Important! Create translations for existing nodes.
translations: true
# Migration processes
process:
type: constants/node_article
# Attach the translation to the already migrated base node.
nid:
plugin: migration
migration: example_creature_base
source: nid
langcode: language
# Another catch! Since we have used the 'title' module to
# translate node titles, we need to assign the special field
# 'title_field' to the 'title' of our destination nodes to
# ensure that we get the translated titles.
title: title_field
body: body
field_one_liner: field_one_liner
uid: 'constants/uid_root'
sticky: sticky
status: status
promote: promote
# Migration dependencies
migration_dependencies:
required:
- example_creature_base
# General dependencies
dependencies:
enforced:
module:
- migrate_example_i18n