diff options
Diffstat (limited to 'phpBB/includes/template/twig/tokenparser/include.php')
| -rw-r--r-- | phpBB/includes/template/twig/tokenparser/include.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/phpBB/includes/template/twig/tokenparser/include.php b/phpBB/includes/template/twig/tokenparser/include.php index d9421095d1..32e1cd331d 100644 --- a/phpBB/includes/template/twig/tokenparser/include.php +++ b/phpBB/includes/template/twig/tokenparser/include.php @@ -22,6 +22,22 @@ class phpbb_template_twig_tokenparser_include extends Twig_TokenParser_Include { /** + * Parses a token and returns a node. + * + * @param Twig_Token $token A Twig_Token instance + * + * @return Twig_NodeInterface A Twig_NodeInterface instance + */ + public function parse(Twig_Token $token) + { + $expr = $this->parser->getExpressionParser()->parseExpression(); + + list($variables, $only, $ignoreMissing) = $this->parseArguments(); + + return new phpbb_template_twig_node_include($expr, $variables, $only, $ignoreMissing, $token->getLine(), $this->getTag()); + } + + /** * Gets the tag name associated with this token parser. * * @return string The tag name |
