PathValidatorInterface::isValid

public PathValidatorInterface::isValid($path) Checks if the URL path is valid and accessible by the current user. Parameters string $path: The path to check. Return value bool TRUE if the path is valid. File core/lib/Drupal/Core/Path/PathValidatorInterface.php, line 44 Class PathValidatorInterface Provides an interface for url path validators. Namespace Drupal\Core\Path Code public function isValid($path);

PathValidatorInterface::getUrlIfValidWithoutAccessCheck

public PathValidatorInterface::getUrlIfValidWithoutAccessCheck($path) Returns a URL object, if the path is valid. Unlike getUrlIfValid(), access check is not performed. Do not use this method if the $path is about to be presented to a user. Parameters string $path: The path to check. Return value \Drupal\Core\Url|false The url object, or FALSE if the path is not valid. File core/lib/Drupal/Core/Path/PathValidatorInterface.php, line 33 Class PathValidatorInterface Provides an interface fo

PathValidatorInterface::getUrlIfValid

public PathValidatorInterface::getUrlIfValid($path) Returns a URL object, if the path is valid and accessible. Parameters string $path: The path to check. Return value \Drupal\Core\Url|false The url object, or FALSE if the path is not valid. File core/lib/Drupal/Core/Path/PathValidatorInterface.php, line 19 Class PathValidatorInterface Provides an interface for url path validators. Namespace Drupal\Core\Path Code public function getUrlIfValid($path);

PathValidatorInterface

Provides an interface for url path validators. Hierarchy interface \Drupal\Core\Path\PathValidatorInterface File core/lib/Drupal/Core/Path/PathValidatorInterface.php, line 8 Namespace Drupal\Core\Path Members Name Modifiers Type Description PathValidatorInterface::getUrlIfValid public function Returns a URL object, if the path is valid and accessible. PathValidatorInterface::getUrlIfValidWithoutAccessCheck public function Returns a URL object, if the path is vali

PathValidator::__construct

public PathValidator::__construct(AccessAwareRouterInterface $access_aware_router, UrlMatcherInterface $access_unaware_router, AccountInterface $account, InboundPathProcessorInterface $path_processor) 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\AccountIn

PathValidator::isValid

public PathValidator::isValid($path) Checks if the URL path is valid and accessible by the current user. Parameters string $path: The path to check. Return value bool TRUE if the path is valid. Overrides PathValidatorInterface::isValid File core/lib/Drupal/Core/Path/PathValidator.php, line 73 Class PathValidator Provides a default path validator and access checker. Namespace Drupal\Core\Path Code public function isValid($path) { return (bool) $this->getUrlIfValid($path); }

PathValidator::getUrlIfValidWithoutAccessCheck

public PathValidator::getUrlIfValidWithoutAccessCheck($path) Returns a URL object, if the path is valid. Unlike getUrlIfValid(), access check is not performed. Do not use this method if the $path is about to be presented to a user. Parameters string $path: The path to check. Return value \Drupal\Core\Url|false The url object, or FALSE if the path is not valid. Overrides PathValidatorInterface::getUrlIfValidWithoutAccessCheck File core/lib/Drupal/Core/Path/PathValidator.php, line 87 Class

PathValidator::getUrlIfValid

public PathValidator::getUrlIfValid($path) Returns a URL object, if the path is valid and accessible. Parameters string $path: The path to check. Return value \Drupal\Core\Url|false The url object, or FALSE if the path is not valid. Overrides PathValidatorInterface::getUrlIfValid File core/lib/Drupal/Core/Path/PathValidator.php, line 80 Class PathValidator Provides a default path validator and access checker. Namespace Drupal\Core\Path Code public function getUrlIfValid($path) { re

PathValidator::getUrl

protected PathValidator::getUrl($path, $access_check) Helper for getUrlIfValid() and getUrlIfValidWithoutAccessCheck(). File core/lib/Drupal/Core/Path/PathValidator.php, line 94 Class PathValidator Provides a default path validator and access checker. Namespace Drupal\Core\Path Code protected function getUrl($path, $access_check) { $path = ltrim($path, '/'); $parsed_url = UrlHelper::parse($path); $options = []; if (!empty($parsed_url['query'])) { $options['query'] = $pars

PathValidator::getPathAttributes

protected PathValidator::getPathAttributes($path, Request $request, $access_check) Gets the matched attributes for a given path. Parameters string $path: The path to check. \Symfony\Component\HttpFoundation\Request $request: A request object with the given path. bool $access_check: If FALSE then skip access check and check only whether the path is valid. Return value array|bool An array of request attributes of FALSE if an exception was thrown. File core/lib/Drupal/Core/Path/PathValidator.php