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

Breadcrumb

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

function PathMatcherInterface::matchPath

Checks if a path matches any pattern in a set of patterns.

Parameters

string $path: The path to match.

string $patterns: A set of patterns separated by a newline.

Return value

bool TRUE if the path matches a pattern, FALSE otherwise.

1 method overrides PathMatcherInterface::matchPath()
PathMatcher::matchPath in core/lib/Drupal/Core/Path/PathMatcher.php
Checks if a path matches any pattern in a set of patterns.

File

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

Class

PathMatcherInterface
Provides an interface for URL path matchers.

Namespace

Drupal\Core\Path

Code

public function matchPath($path, $patterns);
RSS feed
Powered by Drupal