diff --git a/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php b/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php index f318312191..6f9fb1b66d 100644 --- a/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php +++ b/core/modules/layout_builder/src/Plugin/SectionStorage/DefaultsSectionStorage.php @@ -449,9 +449,10 @@ public function isSupported($entity_type_id, $bundle, $view_mode) { if (isset($supported[$id])) { return $supported[$id]; } - $display = LayoutBuilderEntityViewDisplay::load($id); + $storage = $this->entityTypeManager->getStorage('entity_view_display'); + $display = $storage->load($id); if (empty($display)) { - $display = LayoutBuilderEntityViewDisplay::load("$entity_type_id.$bundle.default"); + $display = $storage->load("$entity_type_id.$bundle.default"); if (!$display) { return FALSE; } diff --git a/core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php b/core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php index c468d1d7d4..ff373db030 100644 --- a/core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php +++ b/core/modules/layout_builder/src/Plugin/SectionStorage/OverridesSectionStorage.php @@ -451,7 +451,8 @@ public function isSupported($entity_type_id, $bundle, $view_mode) { if (isset($supported[$id])) { return $supported[$id]; } - $display = LayoutBuilderEntityViewDisplay::load("$entity_type_id.$bundle.$view_mode"); + $storage = $this->entityTypeManager->getStorage('entity_view_display'); + $display = $storage->load("$entity_type_id.$bundle.$view_mode"); $supported[$id] = $display->isLayoutBuilderEnabled() && $display->isOverridable(); return $supported[$id]; }