You are here

uc7_comment_field_instance.yml in Commerce Migrate 3.1.x

modules/ubercart/migrations/uc7_comment_field_instance.yml

File

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