public function Twig_Environment::getTags in Translation template extractor 7.3
Same name and namespace in other branches
- 6.3 vendor/Twig/Environment.php \Twig_Environment::getTags()
Gets registered tags.
Be warned that this method cannot return tags defined by Twig_TokenParserBrokerInterface classes.
Return value
Twig_TokenParserInterface[] An array of Twig_TokenParserInterface instances
File
- vendor/
Twig/ Environment.php, line 875
Class
- Twig_Environment
- Stores the Twig configuration.
Code
public function getTags() {
$tags = array();
foreach ($this
->getTokenParsers()
->getParsers() as $parser) {
if ($parser instanceof Twig_TokenParserInterface) {
$tags[$parser
->getTag()] = $parser;
}
}
return $tags;
}