You are here

public function LayoutBuilder::__construct in Core Context 8

LayoutBuilder constructor.

Parameters

\Drupal\Core\Entity\EntityDisplayRepositoryInterface $entity_display_repository: The entity display repository service.

\Drupal\core_context\ContextProvider\CanonicalEntity $canonical: The 'core_context.canonical_entity' service.

mixed ...$arguments: Additional arguments to pass to the parent constructor.

Overrides RouteAwareContextProviderBase::__construct

File

src/ContextProvider/LayoutBuilder.php, line 38

Class

LayoutBuilder
Exposes contexts available at Layout Builder routes.

Namespace

Drupal\core_context\ContextProvider

Code

public function __construct(EntityDisplayRepositoryInterface $entity_display_repository, CanonicalEntity $canonical, ...$arguments) {
  $this->entityDisplayRepository = $entity_display_repository;
  $this->canonical = $canonical;
  parent::__construct(...$arguments);
}