X-Git-Url: http://aleph1.co.uk/gitweb/?a=blobdiff_plain;f=web%2Fcore%2Fmodules%2Flayout_builder%2Fsrc%2FField%2FLayoutSectionItemList.php;h=c2603192f21689a11b76d93313e08ad45e22c0b4;hb=5b8bb166bfa98770daef9de5c127fc2e6ef02340;hp=a2ceca1373819bc00c91a9d323385c8e5cab1b45;hpb=af6d1fb995500ae68849458ee10d66abbdcfb252;p=yaffs-website diff --git a/web/core/modules/layout_builder/src/Field/LayoutSectionItemList.php b/web/core/modules/layout_builder/src/Field/LayoutSectionItemList.php index a2ceca137..c2603192f 100644 --- a/web/core/modules/layout_builder/src/Field/LayoutSectionItemList.php +++ b/web/core/modules/layout_builder/src/Field/LayoutSectionItemList.php @@ -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; } }