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. node:
  59. 0: node_syndicate_block
  60. search:
  61. 0: search_form_block
  62. statistics:
  63. 0: statistics_popular_block
  64. system:
  65. 0: system_powered_by_block
  66. user:
  67. 0: user_login_block
  68. 1: system_menu_block:tools
  69. 2: views_block:who_s_new-block_1
  70. 3: views_block:who_s_online-who_s_online_block
  71. -
  72. plugin: block_plugin_id
  73. -
  74. plugin: skip_on_empty
  75. method: row
  76. theme:
  77. plugin: block_theme
  78. source:
  79. - theme
  80. - default_theme
  81. - admin_theme
  82. region:
  83. plugin: block_region
  84. source:
  85. - theme
  86. - '@theme'
  87. - region
  88. map:
  89. garland:
  90. olivero:
  91. # Garland 6.x --> Olivero
  92. header: header
  93. footer: footer_top
  94. left: sidebar
  95. right: sidebar
  96. # If mapping fails, put the block in the content region.
  97. default_value: content
  98. weight:
  99. -
  100. plugin: get
  101. source: weight
  102. -
  103. # Block weights must be integers.
  104. plugin: callback
  105. callable: intval
  106. settings:
  107. plugin: block_settings
  108. source:
  109. - '@plugin'
  110. - delta
  111. - settings
  112. - title
  113. _role_ids:
  114. plugin: roles_lookup
  115. migration: d6_user_role
  116. visibility:
  117. plugin: block_visibility
  118. source:
  119. - visibility
  120. - pages
  121. - roles
  122. # If the block uses PHP visibility, don't migrate it unless the PHP module
  123. # is enabled.
  124. skip_php: true
  125. destination:
  126. plugin: entity:block
  127. migration_dependencies:
  128. required:
  129. - menu
  130. - d6_custom_block
  131. - d6_user_role

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