You are here

public function Twig_Environment::getTags in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/twig/twig/lib/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/twig/lib/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;
}