function AliasPathMatcher::isFrontPage
Checks if the current page is the front page.
Return value
bool TRUE if the current page is the front page.
Overrides PathMatcherInterface::isFrontPage
File
-
core/
modules/ path_alias/ src/ AliasPathMatcher.php, line 39
Class
- AliasPathMatcher
- Extends the default path matcher to check aliases.
Namespace
Drupal\path_aliasCode
public function isFrontPage() {
// Cache the result as this is called often.
$this->isCurrentFrontPage ??= $this->decorated
->isFrontPage() || $this->isAliasFrontPage();
return $this->isCurrentFrontPage;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.