Updated Drupal to 8.6. This goes with the following updates because it's possible...
[yaffs-website] / web / core / modules / layout_builder / src / Field / LayoutSectionItemList.php
index a2ceca1373819bc00c91a9d323385c8e5cab1b45..c2603192f21689a11b76d93313e08ad45e22c0b4 100644 (file)
@@ -47,9 +47,12 @@ class LayoutSectionItemList extends FieldItemList implements SectionListInterfac
   /**
    * {@inheritdoc}
    */
-  public function __wakeup() {
+  public function getEntity() {
+    $entity = parent::getEntity();
+
     // Ensure the entity is updated with the latest value.
-    $this->getEntity()->set($this->getName(), $this->getValue());
+    $entity->set($this->getName(), $this->getValue());
+    return $entity;
   }
 
 }