migrate_plus.migration.d6_edlp_pages.yml 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. id: d6_edlp_pages
  2. label: Edlp Drupal 6 pages
  3. migration_tags:
  4. - Drupal 6
  5. deriver: Drupal\node\Plugin\migrate\D6NodeDeriver
  6. migration_group: d6_edlp
  7. source:
  8. plugin: d6_edlp_pages
  9. node_type: page
  10. process:
  11. # In D6, nodes always have a tnid, but it's zero for untranslated nodes.
  12. # We normalize it to equal the nid in that case.
  13. # @see \Drupal\node\Plugin\migrate\source\d6\Node::prepareRow().
  14. # If you are using this file to build a custom migration consider removing
  15. # the nid and vid fields to allow incremental migrations.
  16. # nid: tnid
  17. # vid: vid
  18. type:
  19. plugin: default_value
  20. default_value: page
  21. langcode:
  22. plugin: default_value
  23. source: language
  24. default_value: "und"
  25. title:
  26. -
  27. plugin: get
  28. source: title
  29. -
  30. plugin: skip_on_empty
  31. method: row
  32. uid:
  33. -
  34. plugin: migration_lookup
  35. migration: d6_edlp_users
  36. source: node_uid
  37. -
  38. plugin: default_value
  39. default_value: 1
  40. # status: status
  41. created: created
  42. changed: changed
  43. promote: promote
  44. sticky: sticky
  45. revision_uid: revision_uid
  46. revision_log: log
  47. revision_timestamp: timestamp
  48. 'body/value': body
  49. 'body/format':
  50. plugin: default_value
  51. default_value: wysiwyg
  52. # taxo term -> entity ref terms
  53. # use this one for fetchCol in plugin
  54. field_entrees:
  55. plugin: migration_lookup
  56. migration: d6_edlp_entrees
  57. source: entrees
  58. # taxo term -> entity ref terms
  59. # use this one for fetchCol in plugin
  60. # field_page_type:
  61. # plugin: migration_lookup
  62. # migration: d6_edlp_pagetype
  63. # source: page_type
  64. field_page_type:
  65. -
  66. plugin: skip_on_empty
  67. method: row
  68. message: 'Page type is missing, skiping row'
  69. source: page_type
  70. -
  71. plugin: migration_lookup
  72. migration: d6_edlp_pagetype
  73. # TODO: exclude pages of type notice (will be incorporated directly into the entree taxo term)
  74. # # file
  75. # # field_mp3 -> field_son
  76. # TODO: pour les pieces sonores les fichiers ne sont pas enregistrés dans le champ car trop lourd. Ils sont sous forme de lien dans le corps du texte. Comment normaliser ça ??
  77. field_son:
  78. plugin: migration_lookup
  79. migration: d6_edlp_allfiles
  80. source: sons_fid
  81. # # field_visuel -> field_visuel
  82. field_visuel:
  83. plugin: migration_lookup
  84. migration: d6_edlp_allfiles
  85. source: visuels_fid
  86. status:
  87. plugin: default_value
  88. default_value: 1
  89. # status:
  90. # plugin: static_map
  91. # source: workflow
  92. # map:
  93. # 1: 0
  94. # 2: 0
  95. # 3: 1
  96. # 4: 1
  97. # workflow
  98. # field_workflow_generic:
  99. # plugin: default_value
  100. # default_value: "generique_publie"
  101. field_workflow_generic:
  102. plugin: static_map
  103. source: workflow
  104. map:
  105. 1: "generique_masque"
  106. 2: "generique_masque"
  107. 3: "generique_publie"
  108. 4: "generique_publie"
  109. # fichiers attachés ??
  110. destination:
  111. plugin: entity:node
  112. migration_dependencies:
  113. required:
  114. - d6_edlp_users
  115. - d6_edlp_entrees
  116. - d6_edlp_pagetype
  117. - d6_edlp_sons
  118. - d6_edlp_allfiles