You are here

d6_vocabulary_field.yml in Drupal 9

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

File

core/modules/taxonomy/migrations/d6_vocabulary_field.yml
View source
  1. id: d6_vocabulary_field
  2. label: Vocabulary field configuration
  3. migration_tags:
  4. - Drupal 6
  5. - Configuration
  6. source:
  7. plugin: d6_taxonomy_vocabulary
  8. constants:
  9. entity_type: node
  10. type: entity_reference
  11. target_entity_type: taxonomy_term
  12. field_prefix: field_
  13. process:
  14. entity_type: 'constants/entity_type'
  15. type: 'constants/type'
  16. # This value is only used in the 'field_name' process pipeline below.
  17. raw_field_name:
  18. -
  19. plugin: migration_lookup
  20. migration: d6_taxonomy_vocabulary
  21. source: vid
  22. -
  23. plugin: skip_on_empty
  24. method: row
  25. field_name:
  26. # Prepend field_ to avoid conflicts with base fields, and make sure the
  27. # result is no longer than 32 characters.
  28. -
  29. plugin: concat
  30. source:
  31. - constants/field_prefix
  32. - '@raw_field_name'
  33. -
  34. plugin: substr
  35. length: 32
  36. -
  37. # This plugin checks if the vocabulary being migrated is the one used by
  38. # Forum. If so, we use the machine name that Forum expects. Otherwise, we
  39. # leave it unchanged.
  40. plugin: forum_vocabulary
  41. machine_name: taxonomy_forums
  42. 'settings/target_type': 'constants/target_entity_type'
  43. cardinality: cardinality
  44. destination:
  45. plugin: entity:field_storage_config
  46. dependencies:
  47. module:
  48. - entity_reference
  49. migration_dependencies:
  50. required:
  51. - d6_taxonomy_vocabulary