Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal
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
drupal
Merge requests
!7026
#3035992
Stale values can be displayed by the Layout Builder UI but are saved correctly
Code
Review changes
Check out branch
Download
Patches
Plain diff
Open
#3035992
Stale values can be displayed by the Layout Builder UI but are saved correctly
issue/drupal-3035992:3035992-stale-values-can
into
11.x
Overview
31
Commits
21
Pipelines
26
Changes
5
Open
Roman Paska
requested to merge
issue/drupal-3035992:3035992-stale-values-can
into
11.x
1 year ago
Overview
9
Commits
21
Pipelines
26
Changes
5
Expand
Closes
#3035992
0
0
Merge request reports
Compare
11.x
version 26
4ef6b14d
1 day ago
version 25
5c6c020a
1 day ago
version 24
d7c1ea21
1 month ago
version 23
4ac11596
1 month ago
version 22
62a0e1f2
1 month ago
version 21
7f9eeaf1
1 month ago
version 20
363dee26
1 month ago
version 19
9932cc7a
1 year ago
version 18
8106f364
1 year ago
version 17
a8942cf2
1 year ago
version 16
13c7f329
1 year ago
version 15
3b984e4a
1 year ago
version 14
fb72f28d
1 year ago
version 13
b081a513
1 year ago
version 12
2c9a98e9
1 year ago
version 11
510316d9
1 year ago
version 10
44d7307c
1 year ago
version 9
bd2871c9
1 year ago
version 8
9c101499
1 year ago
version 7
be8c52bb
1 year ago
version 6
98374051
1 year ago
version 5
65038fa5
1 year ago
version 4
6d214d89
1 year ago
version 3
9dd5e7d9
1 year ago
version 2
9c101499
1 year ago
version 1
6337460e
1 year ago
11.x (HEAD)
and
latest version
latest version
a84fa1f3
21 commits,
1 day ago
version 26
4ef6b14d
20 commits,
1 day ago
version 25
5c6c020a
19 commits,
1 day ago
version 24
d7c1ea21
18 commits,
1 month ago
version 23
4ac11596
17 commits,
1 month ago
version 22
62a0e1f2
16 commits,
1 month ago
version 21
7f9eeaf1
15 commits,
1 month ago
version 20
363dee26
14 commits,
1 month ago
version 19
9932cc7a
13 commits,
1 year ago
version 18
8106f364
12 commits,
1 year ago
version 17
a8942cf2
11 commits,
1 year ago
version 16
13c7f329
10 commits,
1 year ago
version 15
3b984e4a
9 commits,
1 year ago
version 14
fb72f28d
8 commits,
1 year ago
version 13
b081a513
7 commits,
1 year ago
version 12
2c9a98e9
6 commits,
1 year ago
version 11
510316d9
5 commits,
1 year ago
version 10
44d7307c
4 commits,
1 year ago
version 9
bd2871c9
3 commits,
1 year ago
version 8
9c101499
2 commits,
1 year ago
version 7
be8c52bb
7 commits,
1 year ago
version 6
98374051
6 commits,
1 year ago
version 5
65038fa5
5 commits,
1 year ago
version 4
6d214d89
4 commits,
1 year ago
version 3
9dd5e7d9
3 commits,
1 year ago
version 2
9c101499
2 commits,
1 year ago
version 1
6337460e
1 commit,
1 year ago
5 files
+
242
−
20
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
core/modules/layout_builder/src/Hook/LayoutBuilderHooks.php
+
21
−
0
Options
@@ -23,6 +23,7 @@
use
Drupal\layout_builder
\Form\DefaultsEntityForm
;
use
Drupal\layout_builder
\Entity\LayoutBuilderEntityViewDisplayStorage
;
use
Drupal\layout_builder
\Entity\LayoutBuilderEntityViewDisplay
;
use
Drupal\layout_builder
\LayoutOverrideFieldHelper
;
use
Drupal\Core\Url
;
use
Drupal\Core\Routing\RouteMatchInterface
;
use
Drupal\Core\Hook\Attribute\Hook
;
@@ -219,6 +220,26 @@ public function entityDelete(EntityInterface $entity): void {
}
}
/**
* Implements hook_entity_update().
*/
#[Hook('entity_update')]
public
function
entityUpdate
(
EntityInterface
$entity
):
void
{
// See if the entity's layout must be updated with the new entity values if:
// 1. It is a fieldable layout
// 2. A layout override field is present.
// @todo Remove instanceof FieldableEntityInterface check in
// https://www.drupal.org/node/3046216
if
(
$entity
instanceof
FieldableEntityInterface
&&
$entity
->
hasField
(
OverridesSectionStorage
::
FIELD_NAME
))
{
// If an entity's field values change, and it also has a layout override
// in the tempstore, the tempstore must be updated to reflect those new
// values.
/** @var \Drupal\layout_builder\LayoutOverrideFieldHelper $override_field_helper */
$override_field_helper
=
\Drupal
::
classResolver
(
LayoutOverrideFieldHelper
::
class
);
$override_field_helper
->
updateTempstoreEntityContext
(
$entity
);
}
}
/**
* Implements hook_cron().
*/
Loading