d7_field_instance.yml

Same filename and directory in other branches
  1. 9 core/modules/field/migrations/d7_field_instance.yml
  2. 8.9.x core/modules/field/migrations/d7_field_instance.yml
  3. 10 core/modules/field/migrations/d7_field_instance.yml
core/modules/field/migrations/d7_field_instance.yml

File

core/modules/field/migrations/d7_field_instance.yml

View source
  1. id: d7_field_instance
  2. label: Field instance configuration
  3. migration_tags:
  4. - Drupal 7
  5. - Configuration
  6. class: Drupal\migrate_drupal\Plugin\migrate\FieldMigration
  7. field_plugin_method: alterFieldInstanceMigration
  8. source:
  9. plugin: d7_field_instance
  10. constants:
  11. status: true
  12. comment_node: comment_node_
  13. process:
  14. type:
  15. plugin: process_field
  16. source: type
  17. method: getFieldType
  18. entity_type: entity_type
  19. field_name: field_name
  20. # The bundle needs to be statically mapped in order to support comment types
  21. # that might already exist before this migration is run. See
  22. # d7_comment_type.yml for more information.
  23. bundle_mapped:
  24. plugin: static_map
  25. source: bundle
  26. bypass: true
  27. map:
  28. comment_node_forum: comment_forum
  29. _comment_type:
  30. -
  31. plugin: explode
  32. source: bundle
  33. delimiter: comment_node_
  34. -
  35. plugin: extract
  36. index: [1]
  37. default: false
  38. -
  39. plugin: skip_on_empty
  40. method: process
  41. -
  42. plugin: migration_lookup
  43. migration:
  44. - d7_comment_type
  45. bundle:
  46. plugin: field_bundle
  47. source:
  48. - entity_type
  49. - '@bundle_mapped'
  50. label: label
  51. description: description
  52. required: required
  53. status: 'constants/status'
  54. allowed_values:
  55. -
  56. plugin: sub_process
  57. source: allowed_vid
  58. process:
  59. -
  60. plugin: migration_lookup
  61. migration: d7_taxonomy_vocabulary
  62. source: vid
  63. settings:
  64. plugin: d7_field_instance_settings
  65. source:
  66. - settings
  67. - widget
  68. - field_definition
  69. default_value_function: ''
  70. default_value:
  71. plugin: d7_field_instance_defaults
  72. source:
  73. - default_value
  74. - widget
  75. translatable: translatable
  76. destination:
  77. plugin: entity:field_config
  78. migration_dependencies:
  79. required:
  80. - d7_field
  81. optional:
  82. - d7_node_type
  83. - d7_comment_type
  84. - d7_taxonomy_vocabulary

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.