function Drupal::pathValidator

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

Returns the path validator.

Return value

\Drupal\Core\Path\PathValidatorInterface

1 call to Drupal::pathValidator()
DrupalTest::testPathValidator in core/tests/Drupal/Tests/Core/DrupalTest.php
Tests the pathValidator() method.

File

core/lib/Drupal.php, line 694

Class

Drupal
Static Service Container wrapper.

Code

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

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