diff --git a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php index 96e2e055bf..df1fdebfc3 100644 --- a/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php +++ b/core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php @@ -270,7 +270,7 @@ public function buildMultiple(array $entities) { * @return array * The render array representing the sections of the entity. */ - private function buildSections(FieldableEntityInterface $entity) { + final protected function buildSections(FieldableEntityInterface $entity) { $contexts = $this->getContextsForEntity($entity); // @todo Remove in https://www.drupal.org/project/drupal/issues/3018782. $label = new TranslatableMarkup('@entity being viewed', [ @@ -332,7 +332,7 @@ protected function getContextsForEntity(FieldableEntityInterface $entity) { */ protected function getRuntimeSections(FieldableEntityInterface $entity, RefinableCacheableDependencyInterface &$cacheability = NULL, array &$contexts = []) { @trigger_error('\Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::getRuntimeSections() is deprecated in Drupal 8.7.0 and will be removed before Drupal 9.0.0. \Drupal\layout_builder\SectionStorage\SectionStorageManagerInterface::findByContext() should be used instead. See https://www.drupal.org/node/3022574.', E_USER_DEPRECATED); - // For backwards compatibility mirror the functionality of ::buildSections() + // For backwards compatibility, mimic the functionality of ::buildSections() // by constructing a cacheable metadata object and retrieving the // entity-based contexts. if (!$cacheability) {