migrate_plus.migration.d6_edlp_pages.yml 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. id: d6_edlp_page
  2. label: Edlp Drupal 6 page
  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. # TODO: exclude pages of type notice (will be incorporated directly into the entree taxo term)
  65. # # file
  66. # # field_mp3 -> field_son
  67. # 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 ??
  68. field_son:
  69. plugin: migration_lookup
  70. migration: d6_edlp_allfiles
  71. source: sons_fid
  72. # # field_visuel -> field_visuel
  73. field_visuel:
  74. plugin: migration_lookup
  75. migration: d6_edlp_allfiles
  76. source: visuels_fid
  77. # workflow
  78. status:
  79. plugin: static_map
  80. source: workflow
  81. map:
  82. 1: 0
  83. 2: 0
  84. 3: 1
  85. 4: 1
  86. # fichiers attachés ??
  87. destination:
  88. plugin: entity:node
  89. migration_dependencies:
  90. required:
  91. - d6_edlp_users
  92. - d6_edlp_entrees
  93. - d6_edlp_pagetype
  94. - d6_edlp_sons
  95. - d6_edlp_allfiles