X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flayout_builder%2Fsrc%2FSection.php;h=1ec0b8af10aea6d433106e59d99758836cdc8b4d;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=30d903a30ab8a8f15eb116389a41c385d833313c;hpb=0bf8d09d2542548982e81a441b1f16e75873a04f;p=yaffs-website diff --git a/web/core/modules/layout_builder/src/Section.php b/web/core/modules/layout_builder/src/Section.php index 30d903a30..1ec0b8af1 100644 --- a/web/core/modules/layout_builder/src/Section.php +++ b/web/core/modules/layout_builder/src/Section.php @@ -356,4 +356,13 @@ class Section { ); } + /** + * Magic method: Implements a deep clone. + */ + public function __clone() { + foreach ($this->components as $uuid => $component) { + $this->components[$uuid] = clone $component; + } + } + }