public function PathBasedBreadcrumbBuilder::__construct in Drupal 10
Same name and namespace in other branches
- 8 core/modules/system/src/PathBasedBreadcrumbBuilder.php \Drupal\system\PathBasedBreadcrumbBuilder::__construct()
- 9 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 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.
File
- core/
modules/ system/ src/ PathBasedBreadcrumbBuilder.php, line 119
Class
- PathBasedBreadcrumbBuilder
- Class to define the menu_link breadcrumb builder.
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');
}