You are here

d7_field_instance.yml in Drupal 10

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. process:
  13. type:
  14. plugin: process_field
  15. source: type
  16. method: getFieldType
  17. entity_type: entity_type
  18. field_name: field_name
  19. # The bundle needs to be statically mapped in order to support comment types
  20. # that might already exist before this migration is run. See
  21. # d7_comment_type.yml for more information.
  22. bundle_mapped:
  23. plugin: static_map
  24. source: bundle
  25. bypass: true
  26. map:
  27. comment_node_forum: comment_forum
  28. bundle:
  29. plugin: field_bundle
  30. source:
  31. - entity_type
  32. - '@bundle_mapped'
  33. label: label
  34. description: description
  35. required: required
  36. status: 'constants/status'
  37. allowed_values:
  38. -
  39. plugin: sub_process
  40. source: allowed_vid
  41. process:
  42. -
  43. plugin: migration_lookup
  44. migration: d7_taxonomy_vocabulary
  45. source: vid
  46. settings:
  47. plugin: d7_field_instance_settings
  48. source:
  49. - settings
  50. - widget
  51. - field_definition
  52. default_value_function: ''
  53. default_value:
  54. plugin: d7_field_instance_defaults
  55. source:
  56. - default_value
  57. - widget
  58. translatable: translatable
  59. destination:
  60. plugin: entity:field_config
  61. migration_dependencies:
  62. required:
  63. - d7_field
  64. optional:
  65. - d7_node_type
  66. - d7_comment_type
  67. - d7_taxonomy_vocabulary