You are here

public function ContextBreadcrumbBuilder::__construct in Context Active Trail 8

Same name and namespace in other branches
  1. 8.2 src/ContextBreadcrumbBuilder.php \Drupal\context_active_trail\ContextBreadcrumbBuilder::__construct()

Constructor.

Parameters

\Drupal\context\ContextManager $context_manager: The context manager.

\Drupal\Core\Menu\MenuActiveTrailInterface $active_trail: The active trail.

\Drupal\Core\Menu\MenuLinkManagerInterface $link_manager: The menu link manager.

\Drupal\Core\Controller\TitleResolverInterface $title_resolver: The title resolver.

\Symfony\Component\HttpFoundation\RequestStack $request_stack: The request stack.

File

src/ContextBreadcrumbBuilder.php, line 76

Class

ContextBreadcrumbBuilder
Build breadcrumbs based on active trail from context.

Namespace

Drupal\context_active_trail

Code

public function __construct(ContextManager $context_manager, MenuActiveTrailInterface $active_trail, MenuLinkManagerInterface $link_manager, TitleResolverInterface $title_resolver, RequestStack $request_stack) {
  $this->contextManager = $context_manager;
  $this->activeTrail = $active_trail;
  $this->linkManager = $link_manager;
  $this->titleResolver = $title_resolver;
  $this->request = $request_stack
    ->getCurrentRequest();
}