migrate_plus.migration.d7_node_materiau.yml 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. id: d7_node_materiau
  2. label: Node Materiau
  3. migration_group: d7_materio
  4. audit: true
  5. migration_tags:
  6. - Drupal 7
  7. - Content
  8. - Materio
  9. # deriver: Drupal\taxonomy\Plugin\migrate\D7TaxonomyTermDeriver
  10. source:
  11. plugin: d7_node_materiau
  12. node_type: materiau
  13. destination:
  14. plugin: entity:node
  15. process:
  16. # nid: nid
  17. type:
  18. plugin: default_value
  19. default_value: materiau
  20. title: title
  21. field_short_description: field_nature_titre
  22. field_migration:
  23. plugin: default_value
  24. default_value: 'migration_imported'
  25. body:
  26. plugin: iterator
  27. source: field_description
  28. process:
  29. value: value
  30. format:
  31. plugin: default_value
  32. default_value: wysiwyg
  33. langcode: language
  34. field_memo: field_memo
  35. field_workflow:
  36. -
  37. plugin: default_value
  38. source: workflow
  39. default_value: 2
  40. -
  41. plugin: static_map
  42. default_value: 2
  43. map:
  44. 1: "workflow_creation"
  45. 2: "workflow_hidden"
  46. 3: "workflow_visible"
  47. 4: "workflow_imported"
  48. 5: "workflow_edited"
  49. field_thesaurus:
  50. plugin: migration_lookup
  51. migration: d7_taxonomy_term_thesaurus
  52. source: field_onthologie
  53. no_stub: true
  54. field_tags:
  55. plugin: migration_lookup
  56. migration: d7_taxonomy_term_tags
  57. source: field_tags_libres
  58. no_stub: true
  59. field_manufacturer:
  60. plugin: migration_lookup
  61. migration: d7_taxonomy_term_company
  62. source: field_company_fab
  63. no_stub: true
  64. field_distributor:
  65. plugin: migration_lookup
  66. migration: d7_taxonomy_term_company
  67. source: field_company_distrib
  68. no_stub: true
  69. field_video:
  70. plugin: iterator
  71. source: field_video_filter
  72. process:
  73. value: url
  74. field_linked_materials:
  75. -
  76. plugin: skip_on_empty
  77. method: process
  78. source: linked_materials
  79. -
  80. plugin: migration_lookup
  81. migration: d7_node_materiau
  82. no_stub: true
  83. field_linked_breves:
  84. -
  85. plugin: skip_on_empty
  86. method: process
  87. source: linked_breves
  88. -
  89. plugin: migration_lookup
  90. migration: d7_node_breve
  91. no_stub: true
  92. field_materiau_images:
  93. plugin: iterator
  94. source: field_materiau_image
  95. process:
  96. target_id:
  97. plugin: migration_lookup
  98. migration: d7_allpublicfiles
  99. source: fid
  100. no_stub: true
  101. alt: alt
  102. title: title
  103. height: height
  104. width: width
  105. field_attachments:
  106. plugin: iterator
  107. source: field_attachments
  108. process:
  109. target_id:
  110. plugin: migration_lookup
  111. migration: d7_allpublicfiles
  112. source: fid
  113. no_stub: true
  114. # there is no description field filled
  115. description: description
  116. field_famille: field_famille
  117. field_index: field_identifiant
  118. field_reference: field_reference_materio
  119. # just archives
  120. field_localisation_old: field_localisation
  121. # custom module rebuilded
  122. field_samples:
  123. plugin: iterator
  124. source: field_location
  125. process:
  126. location: location
  127. target_id:
  128. plugin: migration_lookup
  129. migration: d7_taxonomy_term_showroom
  130. source: showroom_tid
  131. no_stub: true
  132. migration_dependencies:
  133. required:
  134. - d7_allpublicfiles
  135. - d7_taxonomy_term_thesaurus
  136. - d7_taxonomy_term_tags
  137. - d7_taxonomy_term_company
  138. - d7_taxonomy_term_showroom
  139. optional:
  140. - d7_node_breve