Drupal 8  8.0.2
PathMatcher Class Reference
Inheritance diagram for PathMatcher:

Public Member Functions

 __construct (ConfigFactoryInterface $config_factory, RouteMatchInterface $route_match)
 
 matchPath ($path, $patterns)
 
 isFrontPage ()
 

Protected Member Functions

 getFrontPagePath ()
 

Protected Attributes

 $isCurrentFrontPage
 
 $frontPage
 
 $regexes
 
 $configFactory
 
 $routeMatch
 

Detailed Description

Provides a path matcher.

Constructor & Destructor Documentation

__construct ( ConfigFactoryInterface  $config_factory,
RouteMatchInterface  $route_match 
)

Creates a new PathMatcher.

Parameters
\Drupal\Core\Config\ConfigFactoryInterface$config_factoryThe config factory.
\Drupal\Core\Routing\RouteMatchInterface$route_matchThe current route match.

References Drupal\configFactory(), and Drupal\routeMatch().

Here is the call graph for this function:

Member Function Documentation

getFrontPagePath ( )
protected

Gets the current front page path.

Returns
string The front page path.

References Drupal\configFactory().

Referenced by PathMatcher\isFrontPage(), and PathMatcher\matchPath().

Here is the call graph for this function:

Here is the caller graph for this function:

isFrontPage ( )

{Checks if the current page is the front page.

Returns
bool TRUE if the current page is the front page.
}

Implements PathMatcherInterface.

References Url\fromRouteMatch(), PathMatcher\getFrontPagePath(), and Drupal\routeMatch().

Here is the call graph for this function:

matchPath (   $path,
  $patterns 
)

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

Parameters
string$pathThe path to match.
string$patternsA set of patterns separated by a newline.
Returns
bool TRUE if the path matches a pattern, FALSE otherwise.
}

Implements PathMatcherInterface.

References PathMatcher\getFrontPagePath().

Here is the call graph for this function:


The documentation for this class was generated from the following file: