* {% include 'header.html' %} * Body * {% include 'footer.html' %} * */ class phpbb_template_twig_tokenparser_event extends Twig_TokenParser_Include { protected function parseArguments() { $stream = $this->parser->getStream(); $ignoreMissing = true; $variables = null; if ($stream->test(Twig_Token::NAME_TYPE, 'with')) { $stream->next(); $variables = $this->parser->getExpressionParser()->parseExpression(); } $only = false; if ($stream->test(Twig_Token::NAME_TYPE, 'only')) { $stream->next(); $only = true; } $stream->expect(Twig_Token::BLOCK_END_TYPE); return array($variables, $only, $ignoreMissing); } /** * Gets the tag name associated with this token parser. * * @return string The tag name */ public function getTag() { return 'EVENT'; } }