Same name and namespace in other branches
  1. 8.9.x core/lib/Drupal/Core/Path/PathMatcherInterface.php \Drupal\Core\Path\PathMatcherInterface
  2. 9 core/lib/Drupal/Core/Path/PathMatcherInterface.php \Drupal\Core\Path\PathMatcherInterface

Provides an interface for URL path matchers.

Hierarchy

Expanded class hierarchy of PathMatcherInterface

All classes that implement PathMatcherInterface

6 files declare their use of PathMatcherInterface
ActiveLinkResponseFilter.php in core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php
ActiveLinkResponseFilterTest.php in core/tests/Drupal/Tests/Core/EventSubscriber/ActiveLinkResponseFilterTest.php
IsFrontPathCacheContext.php in core/lib/Drupal/Core/Cache/Context/IsFrontPathCacheContext.php
IsFrontPathCacheContextTest.php in core/tests/Drupal/Tests/Core/Cache/Context/IsFrontPathCacheContextTest.php
PathBasedBreadcrumbBuilder.php in core/modules/system/src/PathBasedBreadcrumbBuilder.php

... See full list

File

core/lib/Drupal/Core/Path/PathMatcherInterface.php, line 8

Namespace

Drupal\Core\Path
View source
interface PathMatcherInterface {

  /**
   * Checks if a path matches any pattern in a set of patterns.
   *
   * @param string $path
   *   The path to match.
   * @param string $patterns
   *   A set of patterns separated by a newline.
   *
   * @return bool
   *   TRUE if the path matches a pattern, FALSE otherwise.
   */
  public function matchPath($path, $patterns);

  /**
   * Checks if the current page is the front page.
   *
   * @return bool
   *   TRUE if the current page is the front page.
   */
  public function isFrontPage();

}

Members

Namesort descending Modifiers Type Description Overrides
PathMatcherInterface::isFrontPage public function Checks if the current page is the front page.
PathMatcherInterface::matchPath public function Checks if a path matches any pattern in a set of patterns.