You are here

protected function LayoutBuilderEntityViewDisplay::contextRepository in Drupal 10

Same name and namespace in other branches
  1. 8 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::contextRepository()
  2. 9 core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php \Drupal\layout_builder\Entity\LayoutBuilderEntityViewDisplay::contextRepository()

Wraps the context repository service.

Return value

\Drupal\Core\Plugin\Context\ContextRepositoryInterface The context repository service.

1 call to LayoutBuilderEntityViewDisplay::contextRepository()
LayoutBuilderEntityViewDisplay::getContextsForEntity in core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php
Gets the available contexts for a given entity.

File

core/modules/layout_builder/src/Entity/LayoutBuilderEntityViewDisplay.php, line 248

Class

LayoutBuilderEntityViewDisplay
Provides an entity view display entity that has a layout.

Namespace

Drupal\layout_builder\Entity

Code

protected function contextRepository() {
  return \Drupal::service('context.repository');
}