d6_block.yml
Same filename in other branches
File
-
core/
modules/ block/ migrations/ d6_block.yml
View source
- id: d6_block
- label: Blocks
- # This configuration migration depends on the d6_custom_block content migration.
- migration_tags:
- - Drupal 6
- - Configuration
- source:
- plugin: block
- process:
- # Block status is not a thing in Drupal 8, so this is how we skip over
- # disabled blocks.
- status:
- plugin: skip_on_empty
- method: row
- source: status
- id:
- # We need something unique, so book, book_1 etc will do.
- plugin: make_unique_entity_field
-
- entity_type: block
- field: id
- postfix: _
- length: 29
- source: module
- _block_module_plugin_id:
- -
- plugin: static_map
- source:
- - module
- map:
- block: block
- default_value: ''
- -
- plugin: skip_on_empty
- method: process
- -
- plugin: migration_lookup
- migration:
- - d6_custom_block
- source:
- - delta
- plugin:
- -
- plugin: static_map
- bypass: true
- source:
- - module
- - delta
- map:
- book:
- 0: book_navigation
- comment:
- 0: views_block:comments_recent-block_1
- forum:
- 0: forum_active_block
- 1: forum_new_block
- locale:
- 0: language_block
- node:
- 0: node_syndicate_block
- search:
- 0: search_form_block
- statistics:
- 0: statistics_popular_block
- system:
- 0: system_powered_by_block
- user:
- 0: user_login_block
- 1: system_menu_block:tools
- 2: views_block:who_s_new-block_1
- 3: views_block:who_s_online-who_s_online_block
- -
- plugin: block_plugin_id
- -
- plugin: skip_on_empty
- method: row
- theme:
- plugin: block_theme
- source:
- - theme
- - default_theme
- - admin_theme
- region:
- plugin: block_region
- source:
- - theme
- - '@theme'
- - region
- map:
- garland:
- olivero:
- # Garland 6.x --> Olivero
- header: header
- footer: footer_top
- left: sidebar
- right: sidebar
- # If mapping fails, put the block in the content region.
- default_value: content
- weight:
- -
- plugin: get
- source: weight
- -
- # Block weights must be integers.
- plugin: callback
- callable: intval
- settings:
- plugin: block_settings
- source:
- - '@plugin'
- - delta
- - settings
- - title
- _role_ids:
- plugin: roles_lookup
- migration: d6_user_role
- visibility:
- plugin: block_visibility
- source:
- - visibility
- - pages
- - roles
- # If the block uses PHP visibility, don't migrate it unless the PHP module
- # is enabled.
- skip_php: true
- destination:
- plugin: entity:block
- migration_dependencies:
- required:
- - menu
- - d6_custom_block
- - d6_user_role
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.