public function Security::getFunctions in Bamboo Twig 8.2
Same name and namespace in other branches
- 8.5 bamboo_twig_security/src/TwigExtension/Security.php \Drupal\bamboo_twig_security\TwigExtension\Security::getFunctions()
- 8 bamboo_twig_security/src/TwigExtension/Security.php \Drupal\bamboo_twig_security\TwigExtension\Security::getFunctions()
- 8.3 bamboo_twig_security/src/TwigExtension/Security.php \Drupal\bamboo_twig_security\TwigExtension\Security::getFunctions()
- 8.4 bamboo_twig_security/src/TwigExtension/Security.php \Drupal\bamboo_twig_security\TwigExtension\Security::getFunctions()
List of all Twig functions.
File
- bamboo_twig_security/
src/ TwigExtension/ Security.php, line 15
Class
- Security
- Provides a 'Security' Twig Extensions.
Namespace
Drupal\bamboo_twig_security\TwigExtensionCode
public function getFunctions() {
return [
new \Twig_SimpleFunction('bamboo_has_permission', [
$this,
'hasPermission',
]),
new \Twig_SimpleFunction('bamboo_has_role', [
$this,
'hasRole',
]),
];
}