d7_styleswitcher_block.yml in Style Switcher 3.0.x
Same filename and directory in other branches
migrations/d7_styleswitcher_block.yml
File
migrations/d7_styleswitcher_block.ymlView source
- id: d7_styleswitcher_block
- label: Style Switcher block
- migration_tags:
- - Drupal 7
- - Configuration
- source:
- plugin: block
- process:
- plugin:
- -
- plugin: static_map
- source: module
- map:
- styleswitcher: styleswitcher_styleswitcher
- # Skip all other blocks.
- default_value: false
- -
- plugin: skip_on_empty
- method: row
- # 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:
- -
- plugin: concat
- source:
- - theme
- - module
- - delta
- delimiter: _
- -
- plugin: machine_name
- field: id
- theme:
- plugin: block_theme
- source:
- - theme
- - default_theme
- - admin_theme
- region:
- plugin: block_region
- source:
- - theme
- - '@theme'
- - region
- map:
- bartik:
- bartik:
- # Bartik 7.x --> Bartik 8.x
- featured: featured_top
- triptych_first: featured_bottom_first
- triptych_middle: featured_bottom_second
- triptych_last: featured_bottom_third
- footer_firstcolumn: footer_first
- footer_secondcolumn: footer_second
- footer_thirdcolumn: footer_third
- footer_fourthcolumn: footer_fourth
- footer: footer_fifth
- # If mapping fails, put the block in the content region.
- default_value: content
- weight: weight
- settings:
- plugin: block_settings
- source:
- - '@plugin'
- - delta
- - settings
- - title
- 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:
- optional:
- - d7_user_role