You are here

d6_vocabulary_field_instance.yml in Drupal 10

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. _vid:
  51. -
  52. plugin: migration_lookup
  53. migration: d6_taxonomy_vocabulary
  54. source: vid
  55. -
  56. plugin: skip_on_empty
  57. method: row
  58. 'settings/handler': 'constants/selection_handler'
  59. 'settings/handler_settings/target_bundles':
  60. plugin: target_bundle
  61. 'settings/handler_settings/auto_create': 'constants/auto_create'
  62. required: required
  63. # Get the i18n taxonomy translation setting for this vocabulary.
  64. # 0 - No multilingual options
  65. # 1 - Localizable terms. Run through the localization system.
  66. # 2 - Predefined language for a vocabulary and its terms.
  67. # 3 - Per-language terms, translatable (referencing terms with different
  68. # languages) but not localizable.
  69. translatable:
  70. plugin: static_map
  71. source: i18ntaxonomy_vocabulary
  72. default_value: 0
  73. map:
  74. 0: false
  75. 1: true
  76. 2: false
  77. 3: true
  78. destination:
  79. plugin: entity:field_config
  80. migration_dependencies:
  81. required:
  82. - d6_node_type
  83. - d6_vocabulary_field