interface PathValidatorInterface in Drupal 8
Same name and namespace in other branches
- 9 core/lib/Drupal/Core/Path/PathValidatorInterface.php \Drupal\Core\Path\PathValidatorInterface
- 10 core/lib/Drupal/Core/Path/PathValidatorInterface.php \Drupal\Core\Path\PathValidatorInterface
Provides an interface for url path validators.
Hierarchy
- interface \Drupal\Core\Path\PathValidatorInterface
Expanded class hierarchy of PathValidatorInterface
All classes that implement PathValidatorInterface
7 files declare their use of PathValidatorInterface
- ContactFormEditForm.php in core/
modules/ contact/ src/ ContactFormEditForm.php - LinkFormatter.php in core/
modules/ link/ src/ Plugin/ Field/ FieldFormatter/ LinkFormatter.php - MenuLinkContentForm.php in core/
modules/ menu_link_content/ src/ Form/ MenuLinkContentForm.php - Route.php in core/
modules/ migrate/ src/ Plugin/ migrate/ process/ Route.php - ShortcutSetController.php in core/
modules/ shortcut/ src/ Controller/ ShortcutSetController.php
File
- core/
lib/ Drupal/ Core/ Path/ PathValidatorInterface.php, line 8
Namespace
Drupal\Core\PathView source
interface PathValidatorInterface {
/**
* Returns a URL object, if the path is valid and accessible.
*
* @param string $path
* The path to check.
*
* @return \Drupal\Core\Url|false
* The url object, or FALSE if the path is not valid.
*/
public function getUrlIfValid($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.
*
* @param string $path
* The path to check.
*
* @return \Drupal\Core\Url|false
* The url object, or FALSE if the path is not valid.
*/
public function getUrlIfValidWithoutAccessCheck($path);
/**
* Checks if the URL path is valid and accessible by the current user.
*
* @param string $path
* The path to check.
*
* @return bool
* TRUE if the path is valid.
*/
public function isValid($path);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
PathValidatorInterface:: |
public | function | Returns a URL object, if the path is valid and accessible. | 1 |
PathValidatorInterface:: |
public | function | Returns a URL object, if the path is valid. | 1 |
PathValidatorInterface:: |
public | function | Checks if the URL path is valid and accessible by the current user. | 1 |