public function Twig_Environment::addTokenParser

Registers a Token Parser.

Parameters

Twig_TokenParserInterface $parser A Twig_TokenParserInterface instance:

File

drupal/core/vendor/twig/twig/lib/Twig/Environment.php, line 684

Class

Twig_Environment
Stores the Twig configuration.

Code

public function addTokenParser(Twig_TokenParserInterface $parser) {
  $this->staging['token_parsers'][] = $parser;
  $this->parsers = null;
}