function PathValidator::__construct

Same name and namespace in other branches
  1. 11.x core/lib/Drupal/Core/Path/PathValidator.php \Drupal\Core\Path\PathValidator::__construct()
  2. 10 core/lib/Drupal/Core/Path/PathValidator.php \Drupal\Core\Path\PathValidator::__construct()
  3. 9 core/lib/Drupal/Core/Path/PathValidator.php \Drupal\Core\Path\PathValidator::__construct()
  4. 8.9.x core/lib/Drupal/Core/Path/PathValidator.php \Drupal\Core\Path\PathValidator::__construct()

Creates a new PathValidator.

Parameters

\Drupal\Core\Routing\AccessAwareRouterInterface $accessAwareRouter: The access aware router.

\Symfony\Component\Routing\Matcher\UrlMatcherInterface $accessUnawareRouter: A router implementation which does not check access.

\Drupal\Core\Session\AccountInterface $account: The current user.

\Drupal\Core\PathProcessor\InboundPathProcessorInterface $pathProcessor: The path processor.

File

core/lib/Drupal/Core/Path/PathValidator.php, line 37

Class

PathValidator
Provides a default path validator and access checker.

Namespace

Drupal\Core\Path

Code

public function __construct(protected AccessAwareRouterInterface $accessAwareRouter, protected UrlMatcherInterface $accessUnawareRouter, protected AccountInterface $account, protected InboundPathProcessorInterface $pathProcessor) {
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.