Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal.php \Drupal::pathValidator()
  2. 9 core/lib/Drupal.php \Drupal::pathValidator()

Returns the path validator.

Return value

\Drupal\Core\Path\PathValidatorInterface

3 calls to Drupal::pathValidator()
DrupalTest::testPathValidator in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the pathValidator() method.
Url::fromInternalUri in core/lib/Drupal/Core/Url.php
Creates a new Url object for 'internal:' URIs.
_batch_finished in core/includes/batch.inc
Ends the batch processing.

File

core/lib/Drupal.php, line 694

Class

Drupal
Static Service Container wrapper.

Code

public static function pathValidator() {
  return static::getContainer()
    ->get('path.validator');
}