Version 1
[yaffs-website] / web / core / modules / field / migration_templates / d6_field_instance.yml
1 id: d6_field_instance
2 label: Field instance configuration
3 migration_tags:
4   - Drupal 6
5 class: Drupal\migrate_drupal\Plugin\migrate\CckMigration
6 cck_plugin_method: processFieldInstance
7 source:
8   plugin: d6_field_instance
9   constants:
10     entity_type: node
11
12 process:
13   # We skip field types that don't exist because they weren't migrated by the
14   # field migration.
15   field_type_exists:
16     -
17       plugin: migration_lookup
18       migration: d6_field
19       source:
20         - field_name
21     -
22       plugin: extract
23       index:
24         - 1
25     -
26       plugin: skip_on_empty
27       method: row
28   entity_type: 'constants/entity_type'
29   field_name: field_name
30   bundle:
31     -
32       plugin: migration_lookup
33       migration: d6_node_type
34       source: type_name
35     -
36       plugin: skip_on_empty
37       method: row
38   label: label
39   description: description
40   required: required
41   status: active
42   settings:
43     plugin: d6_field_field_settings
44     source:
45       - widget_type
46       - widget_settings
47       - global_settings
48
49   default_value_callback: ''
50   default_value:
51     plugin: d6_field_instance_defaults
52     source:
53       - widget_type
54       - widget_settings
55
56 destination:
57   plugin: entity:field_config
58 migration_dependencies:
59   required:
60     - d6_node_type
61     - d6_field