public function Security::getFunctions in Bamboo Twig 8.5
Same name and namespace in other branches
- 8 bamboo_twig_security/src/TwigExtension/Security.php \Drupal\bamboo_twig_security\TwigExtension\Security::getFunctions()
- 8.2 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 16
Class
- Security
- Provides a 'Security' Twig Extensions.
Namespace
Drupal\bamboo_twig_security\TwigExtensionCode
public function getFunctions() {
return [
new TwigFunction('bamboo_has_permission', [
$this,
'hasPermission',
]),
new TwigFunction('bamboo_has_permissions', [
$this,
'hasPermissions',
]),
new TwigFunction('bamboo_has_role', [
$this,
'hasRole',
]),
new TwigFunction('bamboo_has_roles', [
$this,
'hasRoles',
]),
];
}