abe4fb5ab4a6846969564fa3809d1f53d1646826
[yaffs-website] / web / core / modules / block / migrations / d6_block.yml
1 id: d6_block
2 label: Blocks
3 migration_tags:
4   - Drupal 6
5   - Configuration
6 source:
7   plugin: block
8 process:
9   # Block status is not a thing in Drupal 8, so this is how we skip over
10   # disabled blocks.
11   status:
12     plugin: skip_on_empty
13     method: row
14     source: status
15   id:
16     # We need something unique, so aggregator, aggregator_1 etc will do.
17     plugin: make_unique_entity_field
18
19     entity_type: block
20     field: id
21     postfix: _
22     length: 32
23     source: module
24   plugin:
25     -
26       plugin: static_map
27       bypass: true
28       source:
29         - module
30         - delta
31       map:
32         book:
33           0: book_navigation
34         comment:
35           0: views_block:comments_recent-block_1
36         forum:
37           0: forum_active_block
38           1: forum_new_block
39         locale:
40           0: language_block
41         node:
42           0: node_syndicate_block
43         search:
44           0: search_form_block
45         statistics:
46           0: statistics_popular_block
47         system:
48           0: system_powered_by_block
49         user:
50           0: user_login_block
51           1: system_menu_block:tools
52           2: views_block:who_s_new-block_1
53           3: views_block:who_s_online-who_s_online_block
54     -
55       plugin: block_plugin_id
56     -
57       plugin: skip_on_empty
58       method: row
59   theme:
60     plugin: block_theme
61     source:
62       - theme
63       - default_theme
64       - admin_theme
65   region:
66     plugin: block_region
67     source:
68       - theme
69       - '@theme'
70       - region
71     map:
72       garland:
73         bartik:
74           # Garland 6.x --> Bartik 8.x
75           header: header
76           footer: footer_fifth
77           left: sidebar_first
78           right: sidebar_second
79     # If mapping fails, put the block in the content region.
80     default_value: content
81   weight: weight
82   settings:
83     plugin: block_settings
84     source:
85       - '@plugin'
86       - delta
87       - settings
88       - title
89   visibility:
90     plugin: block_visibility
91     source:
92       - visibility
93       - pages
94       - roles
95     # If the block uses PHP visibility, don't migrate it unless the PHP module
96     # is enabled.
97     skip_php: true
98 destination:
99   plugin: entity:block
100 migration_dependencies:
101   required:
102     - menu
103     - d6_custom_block
104     - d6_user_role