diff core/modules/layout_builder/src/Section.php @ 4:a9cd425dd02b

Update, including to Drupal core 8.6.10
author Chris Cannam
date Thu, 28 Feb 2019 13:11:55 +0000
parents c75dbcec494b
children 12f9dff5fda9
line wrap: on
line diff
--- a/core/modules/layout_builder/src/Section.php	Thu Feb 28 11:14:44 2019 +0000
+++ b/core/modules/layout_builder/src/Section.php	Thu Feb 28 13:11:55 2019 +0000
@@ -356,4 +356,13 @@
     );
   }
 
+  /**
+   * Magic method: Implements a deep clone.
+   */
+  public function __clone() {
+    foreach ($this->components as $uuid => $component) {
+      $this->components[$uuid] = clone $component;
+    }
+  }
+
 }