Skip to content
Snippets Groups Projects
Commit a133a7b8 authored by Igor Biki's avatar Igor Biki
Browse files

Merge branch 'feature/ISTWCMS-5686-l26yan-Update-to-layout_builder_styles-2.0.0' into '1.0.x'

ISTWCMS-5686 Refactor to ensure that the contained width is selected by default due to new feature from 2.0.0

See merge request !266
parents 9360a2d9 b336fbd3
No related branches found
No related tags found
1 merge request!266ISTWCMS-5686 Refactor to ensure that the contained width is selected by default due to new feature from 2.0.0
Showing
with 18 additions and 4 deletions
langcode: en
status: true
dependencies: { }
id: default
label: Style
multiselect: single
form_type: checkboxes
required: true
weight: 100
......@@ -5,6 +5,7 @@ id: uw_lbs_carousel_1_item
label: 'Carousel - 1 item'
classes: uw-carousel--one-item
type: component
group: default
weight: -10
block_restrictions:
- 'inline_block:uw_cbl_facts_and_figures'
......
......@@ -5,6 +5,7 @@ id: uw_lbs_carousel_2_items
label: 'Carousel - 2 items'
classes: uw-carousel--two-items
type: component
group: default
weight: -9
block_restrictions:
- 'inline_block:uw_cbl_facts_and_figures'
......
......@@ -5,6 +5,7 @@ id: uw_lbs_carousel_3_items
label: 'Carousel - 3 items'
classes: uw-carousel--three-items
type: component
group: default
weight: -8
block_restrictions:
- 'inline_block:uw_cbl_facts_and_figures'
......
......@@ -5,6 +5,7 @@ id: uw_lbs_carousel_4_items
label: 'Carousel - 4 items'
classes: uw-carousel--four-items
type: component
group: default
weight: -7
block_restrictions:
- 'inline_block:uw_cbl_facts_and_figures'
......
......@@ -5,6 +5,7 @@ id: uw_lbs_contained_width
label: 'Extra-wide contained width'
classes: uw-contained-width
type: section
group: default
weight: -4
block_restrictions:
- 'inline_block:uw_cbl_call_to_action'
......
......@@ -5,6 +5,7 @@ id: uw_lbs_contained_width_narrow
label: 'Narrow contained width'
classes: "uw-contained-width\r\nuw-contained-width--narrow"
type: section
group: default
weight: -6
block_restrictions: { }
layout_restrictions: { }
......@@ -5,6 +5,7 @@ id: uw_lbs_contained_width_wide
label: 'Wide contained width'
classes: "uw-contained-width\r\nuw-contained-width--wide"
type: section
group: default
weight: -5
block_restrictions: { }
layout_restrictions: { }
......@@ -5,6 +5,7 @@ id: uw_lbs_full_width
label: 'Full width'
classes: uw-full-width
type: section
group: default
weight: -3
block_restrictions:
- 'inline_block:uw_cbl_call_to_action'
......
......@@ -178,11 +178,8 @@ function uw_cfg_common_entity_presave(EntityInterface $entity) {
* Remove the None option from layout builder styles.
*/
function uw_cfg_common_form_layout_builder_configure_section_alter(array &$form, FormStateInterface $form_state, string $form_id): void {
// Remove the None option from layout builder styles.
unset($form['layout_builder_style']['#empty_option']);
// Ensuring that the contained width is selected by default.
$form['layout_builder_style']['#default_value'] = $form['layout_builder_style']['#default_value'] ?: 'uw_lbs_contained_width';
$form['layout_builder_style_default']['#default_value']['uw_lbs_contained_width'] = 'uw_lbs_contained_width';
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment