Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
ui_patterns
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
ui_patterns
Commits
c4f9072c
Commit
c4f9072c
authored
8 months ago
by
Florent Torregrosa
Committed by
Pierre Dureau
8 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3464894
by grimreaper, pdureau: Drag & drop support in layout builder
parent
98575928
No related branches found
No related tags found
1 merge request
!210
Issue #3464894 by grimreaper, pdureau: [2.0.0-beta2] Drag & drop and UI Styles...
Pipeline
#282239
passed with warnings
8 months ago
Stage: build
Stage: validate
Stage: test
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/ui_patterns_layouts/src/Element/ComponentAlterer.php
+8
-1
8 additions, 1 deletion
modules/ui_patterns_layouts/src/Element/ComponentAlterer.php
with
8 additions
and
1 deletion
modules/ui_patterns_layouts/src/Element/ComponentAlterer.php
+
8
−
1
View file @
c4f9072c
...
...
@@ -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
]);
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment