Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PathBasedBreadcrumbBuilder.php

function PathBasedBreadcrumbBuilder::__construct

Constructs the PathBasedBreadcrumbBuilder.

Parameters

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

\Drupal\Core\Access\AccessManagerInterface $access_manager: The access check 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.

File

core/modules/system/src/PathBasedBreadcrumbBuilder.php, line 124

Class

PathBasedBreadcrumbBuilder
Defines a class to build path-based breadcrumbs.

Namespace

Drupal\system

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) {
    $this->context = $context;
    $this->accessManager = $access_manager;
    $this->router = $router;
    $this->pathProcessor = $path_processor;
    $this->config = $config_factory->get('system.site');
    $this->titleResolver = $title_resolver;
    $this->currentUser = $current_user;
    $this->currentPath = $current_path;
    $this->pathMatcher = $path_matcher ?: \Drupal::service('path.matcher');
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal