projects
/
yaffs-website
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Pull merge.
[yaffs-website]
/
web
/
core
/
modules
/
layout_builder
/
src
/
SectionStorage
/
SectionStorageTrait.php
diff --git
a/web/core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php
b/web/core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php
index 9d942c7ad85982898e0480f3f7cac4d075b2f83e..36729d2ba6240d0377c9adf6cc7734d317c5c5fc 100644
(file)
--- a/
web/core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php
+++ b/
web/core/modules/layout_builder/src/SectionStorage/SectionStorageTrait.php
@@
-111,4
+111,17
@@
trait SectionStorageTrait {
return isset($this->getSections()[$delta]);
}
return isset($this->getSections()[$delta]);
}
+ /**
+ * Magic method: Implements a deep clone.
+ */
+ public function __clone() {
+ $sections = $this->getSections();
+
+ foreach ($sections as $delta => $item) {
+ $sections[$delta] = clone $item;
+ }
+
+ $this->setSections($sections);
+ }
+
}
}