Skip to content
Snippets Groups Projects
Commit c4f9072c authored by Florent Torregrosa's avatar Florent Torregrosa Committed by Pierre Dureau
Browse files

Issue #3464894 by grimreaper, pdureau: Drag & drop support in layout builder

parent 98575928
No related branches found
No related tags found
1 merge request!210Issue #3464894 by grimreaper, pdureau: [2.0.0-beta2] Drag & drop and UI Styles...
Pipeline #282239 passed with warnings
......@@ -39,8 +39,15 @@ class ComponentAlterer implements TrustedCallbackInterface {
foreach (Element::children($element[$region_id]) as $block_id) {
$element["#slots"][$region_id][$block_id] = $element[$region_id][$block_id];
}
if (isset($element[$region_id]['#attributes'])) {
if (isset($element[$region_id]['#attributes']) && isset($element['#slots'][$region_id])) {
$element['#region_attributes'][$region_id] = new Attribute($element[$region_id]['#attributes']);
// Support for drag&drop and other attributes manipulation.
$element['#slots'][$region_id] = [
'#type' => 'html_tag',
'#tag' => 'div',
'#attributes' => $element[$region_id]['#attributes'],
'content' => $element['#slots'][$region_id],
];
}
unset($element[$region_id]);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment