A class that defines the Twig 'trans' token parser for Drupal.
The token parser converts a token stream created from template source code into an Abstract Syntax Tree (AST). The AST will later be compiled into PHP code usable for runtime execution of the template.
Hierarchy
- class \Twig_TokenParser implements \Twig_TokenParserInterface
- class \Drupal\Core\Template\TwigTransTokenParser
See also
\Twig_TokenParser
http://twig.sensiolabs.org/doc/extensions/i18n.html
https://github.com/fabpot/Twig-extensions
File
- core/lib/Drupal/Core/Template/TwigTransTokenParser.php, line 16
Namespace
Drupal\Core\Template
Members
Name | Modifiers | Type | Description |
---|---|---|---|
TwigTransTokenParser::checkTransString | protected | function | Ensure that any nodes that are parsed are only of allowed types. |
TwigTransTokenParser::decideForEnd | public | function | Detect the end of a 'trans' tag. |
TwigTransTokenParser::decideForFork | public | function | Detect a 'plural' switch or the end of a 'trans' tag. |
TwigTransTokenParser::getTag | public | function | |
TwigTransTokenParser::parse | public | function | |
Twig_TokenParser::$parser | protected | property | |
Twig_TokenParser::setParser | public | function | Sets the parser associated with this token parser. |
Please login to continue.