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

Breadcrumb

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

function IsFrontPathCacheContext::__construct

Constructs an IsFrontPathCacheContext object.

Parameters

\Drupal\Core\Path\PathMatcherInterface $path_matcher: The path matcher.

File

core/lib/Drupal/Core/Cache/Context/IsFrontPathCacheContext.php, line 26

Class

IsFrontPathCacheContext
Defines a cache context for whether the URL is the front page of the site.

Namespace

Drupal\Core\Cache\Context

Code

public function __construct(PathMatcherInterface $path_matcher) {
    $this->pathMatcher = $path_matcher;
}
RSS feed
Powered by Drupal