Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. PathMatcherInterface.php

interface PathMatcherInterface

Provides an interface for URL path matchers.

Hierarchy

  • interface \Drupal\Core\Path\PathMatcherInterface

Expanded class hierarchy of PathMatcherInterface

All classes that implement PathMatcherInterface

5 files declare their use of PathMatcherInterface
ActiveLinkResponseFilter.php in core/lib/Drupal/Core/EventSubscriber/ActiveLinkResponseFilter.php
IsFrontPathCacheContext.php in core/lib/Drupal/Core/Cache/Context/IsFrontPathCacheContext.php
LanguageBlock.php in core/modules/language/src/Plugin/Block/LanguageBlock.php
PathBasedBreadcrumbBuilder.php in core/modules/system/src/PathBasedBreadcrumbBuilder.php
RequestPath.php in core/modules/system/src/Plugin/Condition/RequestPath.php

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

Title Sort descending Modifiers Object type Summary Overrides
PathMatcherInterface::isFrontPage public function Checks if the current page is the front page. 1
PathMatcherInterface::matchPath public function Checks if a path matches any pattern in a set of patterns. 1

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal