96b204eaa55f9a5d0fb86c51e1ee37b16919bcb7
[yaffs-website] / web / core / modules / block / migration_templates / d7_block.yml
1 id: d7_block
2 label: Blocks
3 migration_tags:
4   - Drupal 7
5 source:
6   plugin: block
7 process:
8   # Block status is not a thing in Drupal 8, so this is how we skip over
9   # disabled blocks.
10   status:
11     plugin: skip_on_empty
12     method: row
13     source: status
14   id:
15     -
16       plugin: concat
17       source:
18         - theme
19         - module
20         - delta
21       delimiter: _
22     -
23       plugin: machine_name
24       field: id
25   plugin:
26     -
27       plugin: static_map
28       bypass: true
29       source:
30         - module
31         - delta
32       map:
33         book:
34           navigation: book_navigation
35         comment:
36           recent: views_block:comments_recent-block_1
37         forum:
38           active: forum_active_block
39           new: forum_new_block
40         # locale:
41         #  0: language_block
42         node:
43           syndicate: node_syndicate_block
44         search:
45           form: search_form_block
46         statistics:
47           popular: statistics_popular_block
48         system:
49           main: system_main_block
50           'powered-by': system_powered_by_block
51         user:
52           login: user_login_block
53           # 1: system_menu_block:tools
54           new: views_block:who_s_new-block_1
55           online: views_block:who_s_online-who_s_online_block
56     -
57       plugin: block_plugin_id
58     -
59       plugin: skip_on_empty
60       method: row
61   theme:
62     plugin: block_theme
63     source:
64       - theme
65       - default_theme
66       - admin_theme
67   region:
68     plugin: block_region
69     source:
70       - theme
71       - '@theme'
72       - region
73     map:
74       bartik:
75         bartik:
76           # Bartik 7.x --> Bartik 8.x
77           featured: featured_top
78           triptych_first: featured_bottom_first
79           triptych_middle: featured_bottom_second
80           triptych_last: featured_bottom_third
81           footer_firstcolumn: footer_first
82           footer_secondcolumn: footer_second
83           footer_thirdcolumn: footer_third
84           footer_fourthcolumn: footer_fourth
85           footer: footer_fifth
86     # If mapping fails, put the block in the content region.
87     default_value: content
88   weight: weight
89   settings:
90     plugin: block_settings
91     source:
92       - '@plugin'
93       - delta
94       - settings
95       - title
96   visibility:
97     plugin: block_visibility
98     source:
99       - visibility
100       - pages
101       - roles
102     # If the block uses PHP visibility, don't migrate it unless the PHP module
103     # is enabled.
104     skip_php: true
105 destination:
106   plugin: entity:block
107 migration_dependencies:
108   optional:
109     - d7_custom_block
110     - d7_user_role