function PathBasedBreadcrumbBuilder::__construct

Same name and namespace in other branches
  1. 11.x core/modules/system/src/PathBasedBreadcrumbBuilder.php \Drupal\system\PathBasedBreadcrumbBuilder::__construct()
  2. 10 core/modules/system/src/PathBasedBreadcrumbBuilder.php \Drupal\system\PathBasedBreadcrumbBuilder::__construct()
  3. 9 core/modules/system/src/PathBasedBreadcrumbBuilder.php \Drupal\system\PathBasedBreadcrumbBuilder::__construct()
  4. 8.9.x core/modules/system/src/PathBasedBreadcrumbBuilder.php \Drupal\system\PathBasedBreadcrumbBuilder::__construct()

File

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

Class

PathBasedBreadcrumbBuilder
Defines a class to build path-based breadcrumbs.

Namespace

Drupal\system

Code

public function __construct(protected RequestContext $context, protected AccessManagerInterface $accessManager, #[Autowire(service: 'router')] protected RequestMatcherInterface $router, protected InboundPathProcessorInterface $pathProcessor, ConfigFactoryInterface $config_factory, protected TitleResolverInterface $titleResolver, protected AccountInterface $currentUser, protected CurrentPathStack $currentPath, ?PathMatcherInterface $path_matcher = NULL) {
  $this->config = $config_factory->get('system.site');
  $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.