Updated to Drupal 8.5. Core Media not yet in use.
[yaffs-website] / web / core / modules / taxonomy / migrations / d6_vocabulary_field_instance.yml
1 id: d6_vocabulary_field_instance
2 label: Vocabulary field instance configuration
3 migration_tags:
4   - Drupal 6
5   - Configuration
6 source:
7   plugin: d6_taxonomy_vocabulary_per_type
8   constants:
9     entity_type: node
10     auto_create: true
11     selection_handler: 'default:taxonomy_term'
12     field_prefix: field_
13 process:
14   entity_type: 'constants/entity_type'
15   bundle:
16     -
17       plugin: migration_lookup
18       migration: d6_node_type
19       source: type
20     -
21       plugin: skip_on_empty
22       method: row
23   # This value is only used in the 'field_name' process pipeline below.
24   raw_field_name:
25     -
26       plugin: migration_lookup
27       migration: d6_taxonomy_vocabulary
28       source: vid
29     -
30       plugin: skip_on_empty
31       method: row
32   field_name:
33     # Prepend field_ to avoid conflicts with base fields, and make sure the
34     # result is no longer than 32 characters.
35     -
36       plugin: concat
37       source:
38         - constants/field_prefix
39         - '@raw_field_name'
40     -
41       plugin: substr
42       length: 32
43     -
44       # This plugin checks if the vocabulary being migrated is the one used by
45       # Forum. If so, we use the machine name that Forum expects. Otherwise, we
46       # leave it unchanged.
47       plugin: forum_vocabulary
48       machine_name: taxonomy_forums
49   label: name
50   'settings/handler': 'constants/selection_handler'
51   'settings/handler_settings/target_bundles/0': '@field_name'
52   'settings/handler_settings/auto_create': 'constants/auto_create'
53   required: required
54 destination:
55   plugin: entity:field_config
56 migration_dependencies:
57   required:
58     - d6_node_type
59     - d6_vocabulary_field