You are here

d6_vocabulary_field_instance.yml in Drupal 9

Same filename and directory in other branches
  1. 8 core/modules/taxonomy/migrations/d6_vocabulary_field_instance.yml
core/modules/taxonomy/migrations/d6_vocabulary_field_instance.yml

File

core/modules/taxonomy/migrations/d6_vocabulary_field_instance.yml
View source
  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. # Get the i18n taxonomy translation setting for this vocabulary.
  55. # 0 - No multilingual options
  56. # 1 - Localizable terms. Run through the localization system.
  57. # 2 - Predefined language for a vocabulary and its terms.
  58. # 3 - Per-language terms, translatable (referencing terms with different
  59. # languages) but not localizable.
  60. translatable:
  61. plugin: static_map
  62. source: i18ntaxonomy_vocabulary
  63. default_value: 0
  64. map:
  65. 0: false
  66. 1: true
  67. 2: false
  68. 3: true
  69. destination:
  70. plugin: entity:field_config
  71. migration_dependencies:
  72. required:
  73. - d6_node_type
  74. - d6_vocabulary_field