migrate_plus.migration.d7_node_materiau.yml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141
  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. # -
  94. # plugin: skip_on_empty
  95. # method: process
  96. # source: field_materiau_image
  97. # -
  98. # plugin: migration_lookup
  99. # migration: d7_allpublicfiles
  100. # no_stub: true
  101. field_materiau_images:
  102. plugin: iterator
  103. source: field_materiau_image
  104. process:
  105. target_id:
  106. plugin: migration_lookup
  107. migration: d7_allpublicfiles
  108. source: fid
  109. no_stub: true
  110. alt: alt
  111. title: title
  112. height: height
  113. width: width
  114. # field_attachments: field_attachments
  115. # field_famille: field_famille
  116. # field_index: field_identifiant
  117. # field_reference: field_reference_materio
  118. # just archives
  119. # : field_localisation
  120. # TODO: need to find an alternative or rebuild the custom module
  121. # : field_location
  122. migration_dependencies:
  123. required:
  124. - d7_allpublicfiles
  125. - d7_taxonomy_term_thesaurus
  126. - d7_taxonomy_term_tags
  127. - d7_taxonomy_term_company
  128. - d7_taxonomy_term_showroom
  129. optional:
  130. - d7_node_breve