d6_block.yml

Same filename in other branches
  1. 9 core/modules/block/migrations/d6_block.yml
  2. 8.9.x core/modules/block/migrations/d6_block.yml
  3. 10 core/modules/block/migrations/d6_block.yml
core/modules/block/migrations/d6_block.yml

File

core/modules/block/migrations/d6_block.yml

View source
  1. id: d6_block
  2. label: Blocks
  3. # This configuration migration depends on the d6_custom_block content migration.
  4. migration_tags:
  5. - Drupal 6
  6. - Configuration
  7. source:
  8. plugin: block
  9. process:
  10. # Block status is not a thing in Drupal 8, so this is how we skip over
  11. # disabled blocks.
  12. status:
  13. plugin: skip_on_empty
  14. method: row
  15. source: status
  16. id:
  17. # We need something unique, so book, book_1 etc will do.
  18. plugin: make_unique_entity_field
  19. entity_type: block
  20. field: id
  21. postfix: _
  22. length: 29
  23. source: module
  24. _block_module_plugin_id:
  25. -
  26. plugin: static_map
  27. source:
  28. - module
  29. map:
  30. block: block
  31. default_value: ''
  32. -
  33. plugin: skip_on_empty
  34. method: process
  35. -
  36. plugin: migration_lookup
  37. migration:
  38. - d6_custom_block
  39. source:
  40. - delta
  41. plugin:
  42. -
  43. plugin: static_map
  44. bypass: true
  45. source:
  46. - module
  47. - delta
  48. map:
  49. book:
  50. 0: book_navigation
  51. comment:
  52. 0: views_block:comments_recent-block_1
  53. forum:
  54. 0: forum_active_block
  55. 1: forum_new_block
  56. locale:
  57. 0: language_block
  58. search:
  59. 0: search_form_block
  60. statistics:
  61. 0: statistics_popular_block
  62. system:
  63. 0: system_powered_by_block
  64. user:
  65. 0: user_login_block
  66. 1: system_menu_block:tools
  67. 2: views_block:who_s_new-block_1
  68. 3: views_block:who_s_online-who_s_online_block
  69. -
  70. plugin: block_plugin_id
  71. -
  72. plugin: skip_on_empty
  73. method: row
  74. theme:
  75. plugin: block_theme
  76. source:
  77. - theme
  78. - default_theme
  79. - admin_theme
  80. region:
  81. plugin: block_region
  82. source:
  83. - theme
  84. - '@theme'
  85. - region
  86. map:
  87. garland:
  88. olivero:
  89. # Garland 6.x --> Olivero
  90. header: header
  91. footer: footer_top
  92. left: sidebar
  93. right: sidebar
  94. # If mapping fails, put the block in the content region.
  95. default_value: content
  96. weight:
  97. -
  98. plugin: get
  99. source: weight
  100. -
  101. # Block weights must be integers.
  102. plugin: callback
  103. callable: intval
  104. settings:
  105. plugin: block_settings
  106. source:
  107. - '@plugin'
  108. - delta
  109. - settings
  110. - title
  111. _role_ids:
  112. plugin: roles_lookup
  113. migration: d6_user_role
  114. visibility:
  115. plugin: block_visibility
  116. source:
  117. - visibility
  118. - pages
  119. - roles
  120. # If the block uses PHP visibility, don't migrate it unless the PHP module
  121. # is enabled.
  122. skip_php: true
  123. destination:
  124. plugin: entity:block
  125. migration_dependencies:
  126. required:
  127. - d6_menu
  128. - d6_custom_block
  129. - d6_user_role

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.