You are here

d7_comment_field_instance.yml in Drupal 8

Same filename and directory in other branches
  1. 9 core/modules/comment/migrations/d7_comment_field_instance.yml
core/modules/comment/migrations/d7_comment_field_instance.yml

File

core/modules/comment/migrations/d7_comment_field_instance.yml
View source
  1. id: d7_comment_field_instance
  2. label: Comment field instance configuration
  3. migration_tags:
  4. - Drupal 7
  5. - Configuration
  6. source:
  7. plugin: d7_node_type
  8. constants:
  9. entity_type: node
  10. label: Comments
  11. required: true
  12. process:
  13. entity_type: 'constants/entity_type'
  14. label: 'constants/label'
  15. required: 'constants/required'
  16. field_name:
  17. -
  18. plugin: migration_lookup
  19. source: type
  20. migration: d7_comment_type
  21. -
  22. plugin: skip_on_empty
  23. method: row
  24. bundle: type
  25. 'default_value/0/status':
  26. # We're using static_map instead of default_value otherwise if the source
  27. # is 0, the default value of 1 would be used.
  28. plugin: static_map
  29. source: comment
  30. map:
  31. 0: 0
  32. 1: 1
  33. 2: 2
  34. default_value: 2
  35. 'settings/default_mode':
  36. # We're using static_map instead of default_value otherwise if the source
  37. # is 0, the default value of 1 would be used.
  38. plugin: static_map
  39. source: comment_default_mode
  40. map:
  41. 0: 0
  42. 1: 1
  43. default_value: 1
  44. 'settings/per_page':
  45. plugin: default_value
  46. source: comment_default_per_page
  47. default_value: 50
  48. 'settings/anonymous':
  49. plugin: default_value
  50. source: comment_anonymous
  51. default_value: 0
  52. 'settings/form_location':
  53. plugin: default_value
  54. source: comment_form_location
  55. default_value: 0
  56. 'settings/preview':
  57. # We're using static_map instead of default_value otherwise if the source
  58. # is 0, the default value of 1 would be used.
  59. plugin: static_map
  60. source: comment_preview
  61. map:
  62. 0: 0
  63. 1: 1
  64. 2: 2
  65. default_value: 1
  66. destination:
  67. plugin: entity:field_config
  68. migration_dependencies:
  69. required:
  70. - d7_node_type
  71. - d7_comment_field