public function FlagCount::getFunctions in Flag 8.4
Generates a list of all Twig functions that this extension defines.
File
- src/
TwigExtension/ FlagCount.php, line 40
Class
- FlagCount
- Provides a Twig extension to get the flag count given a flag and flaggable.
Namespace
Drupal\flag\TwigExtensionCode
public function getFunctions() {
return [
new \Twig_SimpleFunction('flagcount', [
$this,
'count',
], [
'is_safe' => [
'html',
],
]),
];
}