function PathValidator::__construct

Same name in other branches
  1. 9 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. 11.x core/lib/Drupal/Core/Path/PathValidator.php \Drupal\Core\Path\PathValidator::__construct()

Creates a new PathValidator.

Parameters

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

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

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

\Drupal\Core\PathProcessor\InboundPathProcessorInterface $path_processor: The path processor;

File

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

Class

PathValidator
Provides a default path validator and access checker.

Namespace

Drupal\Core\Path

Code

public function __construct(AccessAwareRouterInterface $access_aware_router, UrlMatcherInterface $access_unaware_router, AccountInterface $account, InboundPathProcessorInterface $path_processor) {
    $this->accessAwareRouter = $access_aware_router;
    $this->accessUnawareRouter = $access_unaware_router;
    $this->account = $account;
    $this->pathProcessor = $path_processor;
}

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