public function IsFront::front in Twig Extender 4.x
Same name and namespace in other branches
- 8.4 src/Plugin/TwigPlugin/IsFront.php \Drupal\twig_extender\Plugin\TwigPlugin\IsFront::front()
- 8.2 src/Plugin/TwigPlugin/IsFront.php \Drupal\twig_extender\Plugin\TwigPlugin\IsFront::front()
- 8.3 src/Plugin/TwigPlugin/IsFront.php \Drupal\twig_extender\Plugin\TwigPlugin\IsFront::front()
Implementation for render block.
File
- src/
Plugin/ TwigPlugin/ IsFront.php, line 23
Class
- IsFront
- The plugin for check authenticated user.
Namespace
Drupal\twig_extender\Plugin\TwigPluginCode
public function front() {
return \Drupal::service('path.matcher')
->isFrontPage();
}