Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
E
experience_builder
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
experience_builder
Merge requests
!345
Initial PoC for saving and reloading model and layout.
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Initial PoC for saving and reloading model and layout.
issue/experience_builder-3478299:3478299-autosave-poc
into
0.x
Overview
19
Commits
17
Pipelines
13
Changes
6
Merged
Dave Long
requested to merge
issue/experience_builder-3478299:3478299-autosave-poc
into
0.x
7 months ago
Overview
18
Commits
17
Pipelines
13
Changes
6
Expand
Closes
#3478299
0
0
Merge request reports
Compare
0.x
version 12
98870a46
6 months ago
version 11
a6f8173b
6 months ago
version 10
621f7663
6 months ago
version 9
b83be61d
6 months ago
version 8
63ef8c87
6 months ago
version 7
bb358a79
6 months ago
version 6
eb94af90
6 months ago
version 5
a9c5f96f
6 months ago
version 4
79faa2ba
6 months ago
version 3
96df3db4
6 months ago
version 2
81387868
7 months ago
version 1
fba6ad66
7 months ago
0.x (base)
and
latest version
latest version
ef348701
17 commits,
6 months ago
version 12
98870a46
16 commits,
6 months ago
version 11
a6f8173b
15 commits,
6 months ago
version 10
621f7663
14 commits,
6 months ago
version 9
b83be61d
13 commits,
6 months ago
version 8
63ef8c87
12 commits,
6 months ago
version 7
bb358a79
11 commits,
6 months ago
version 6
eb94af90
10 commits,
6 months ago
version 5
a9c5f96f
8 commits,
6 months ago
version 4
79faa2ba
7 commits,
6 months ago
version 3
96df3db4
3 commits,
6 months ago
version 2
81387868
2 commits,
7 months ago
version 1
fba6ad66
1 commit,
7 months ago
6 files
+
64
−
6
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
6
Search (e.g. *.vue) (Ctrl+P)
src/Controller/ApiLayoutController.php
+
6
−
0
Options
@@ -13,11 +13,17 @@ use Symfony\Component\HttpFoundation\JsonResponse;
final
class
ApiLayoutController
{
use
NotTheGoodAutoSaveTrait
;
public
function
__invoke
(
FieldableEntityInterface
$entity
):
JsonResponse
{
if
(
$entity
->
bundle
()
!==
'article'
)
{
throw
new
\LogicException
(
'For now, this assumes the entity is an article!'
);
}
if
(
$body
=
$this
->
getAutoSaveData
(
$entity
))
{
return
new
JsonResponse
(
$body
);
}
$item
=
$entity
->
get
(
'field_xb_demo'
)
->
first
();
assert
(
$item
instanceof
ComponentTreeItem
);
$tree
=
$item
->
get
(
'tree'
);
Loading