You are here

public function BreadcrumbManagerBuilder::__construct in Breadcrumb Manager 8

Constructs the PathBasedBreadcrumbBuilder.

Parameters

\Drupal\Core\Routing\RequestContext $context: The router request context.

\Drupal\Core\Access\AccessManagerInterface $access_manager: The menu link access service.

\Symfony\Component\Routing\Matcher\RequestMatcherInterface $router: The dynamic router service.

\Drupal\Core\PathProcessor\InboundPathProcessorInterface $path_processor: The inbound path processor.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory service.

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

\Drupal\Core\Session\AccountInterface $current_user: The current user object.

\Drupal\Core\Path\CurrentPathStack $current_path: The current path.

\Drupal\Core\Path\PathMatcherInterface $path_matcher: The path matcher service.

Overrides PathBasedBreadcrumbBuilder::__construct

File

src/Breadcrumb/BreadcrumbManagerBuilder.php, line 77

Class

BreadcrumbManagerBuilder
Class BreadcrumbManagerBuilder.

Namespace

Drupal\breadcrumb_manager\Breadcrumb

Code

public function __construct(RequestContext $context, AccessManagerInterface $access_manager, RequestMatcherInterface $router, InboundPathProcessorInterface $path_processor, ConfigFactoryInterface $config_factory, TitleResolverInterface $title_resolver, AccountInterface $current_user, CurrentPathStack $current_path, PathMatcherInterface $path_matcher = NULL, BreadcrumbTitleResolverManager $title_resolver_manager, ModuleHandlerInterface $module_handler) {
  parent::__construct($context, $access_manager, $router, $path_processor, $config_factory, $title_resolver, $current_user, $current_path, $path_matcher);
  $this->titleResolverManager = $title_resolver_manager;
  $this->titleResolvers = $this->titleResolverManager
    ->getInstances();
  $this->breadcrumbConfig = $config_factory
    ->get('breadcrumb_manager.config');
  $this->moduleHandler = $module_handler;
}