function PathBasedBreadcrumbBuilder::__construct
Same name in other branches
- 9 core/modules/system/src/PathBasedBreadcrumbBuilder.php \Drupal\system\PathBasedBreadcrumbBuilder::__construct()
- 8.9.x core/modules/system/src/PathBasedBreadcrumbBuilder.php \Drupal\system\PathBasedBreadcrumbBuilder::__construct()
- 11.x core/modules/system/src/PathBasedBreadcrumbBuilder.php \Drupal\system\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 123
Class
- PathBasedBreadcrumbBuilder
- Defines a class to build path-based breadcrumbs.
Namespace
Drupal\systemCode
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');
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.