diff --git a/core/modules/layout_builder/src/Controller/LayoutBuilderController.php b/core/modules/layout_builder/src/Controller/LayoutBuilderController.php index 62164f65f0..6ce0d628a3 100644 --- a/core/modules/layout_builder/src/Controller/LayoutBuilderController.php +++ b/core/modules/layout_builder/src/Controller/LayoutBuilderController.php @@ -322,6 +322,8 @@ public function revertLayout(SectionStorageInterface $section_storage) { } $section_storage->save(); $this->layoutTempstoreRepository->delete($section_storage); + // @todo Decide if this is the correct URL to return in + // https://www.drupal.org/project/drupal/issues/2936501. return new RedirectResponse($section_storage->getLayoutBuilderUrl()->setAbsolute()->toString()); } diff --git a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php index 246fb521ac..a0749636d0 100644 --- a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php +++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php @@ -161,14 +161,6 @@ public function preSave(EntityStorageInterface $storage) { $field->delete(); } } - - // Ensure the plugin configuration is updated. Once layouts are no longer - // stored as third party settings, this will be handled by the code in - // \Drupal\Core\Config\Entity\ConfigEntityBase::preSave() that handles - // \Drupal\Core\Entity\EntityWithPluginCollectionInterface. - foreach ($this->getSections() as $delta => $section) { - $this->setSection($delta, $section); - } } /** diff --git a/core/modules/layout_builder/src/OverridesSectionStorageInterface.php b/core/modules/layout_builder/src/OverridesSectionStorageInterface.php index 40bb73153c..0d6fd2b056 100644 --- a/core/modules/layout_builder/src/OverridesSectionStorageInterface.php +++ b/core/modules/layout_builder/src/OverridesSectionStorageInterface.php @@ -17,6 +17,9 @@ * * @return \Drupal\layout_builder\SectionStorageInterface * The defaults section storage. + * + * @todo Determine if this method needs a parameter in + * https://www.drupal.org/project/drupal/issues/2936507. */ public function getDefaultSectionStorage(); diff --git a/core/modules/layout_builder/src/SectionStorageInterface.php b/core/modules/layout_builder/src/SectionStorageInterface.php index b564793458..205d407e14 100644 --- a/core/modules/layout_builder/src/SectionStorageInterface.php +++ b/core/modules/layout_builder/src/SectionStorageInterface.php @@ -18,7 +18,7 @@ * Gets the layout sections. * * @return \Drupal\layout_builder\Section[] - * An sequentially and numerically keyed array of section objects. + * A sequentially and numerically keyed array of section objects. */ public function getSections();