public function Twig_TokenParser_Include::parse in Translation template extractor 6.3
Same name and namespace in other branches
- 7.3 vendor/Twig/TokenParser/Include.php \Twig_TokenParser_Include::parse()
Parses a token and returns a node.
Parameters
Twig_Token $token A Twig_Token instance:
Return value
Twig_NodeInterface A Twig_NodeInterface instance
Overrides Twig_TokenParserInterface::parse
1 method overrides Twig_TokenParser_Include::parse()
- Twig_TokenParser_Embed::parse in vendor/
Twig/ TokenParser/ Embed.php - Parses a token and returns a node.
File
- vendor/
Twig/ TokenParser/ Include.php, line 31
Class
- Twig_TokenParser_Include
- Includes a template.
Code
public function parse(Twig_Token $token) {
$expr = $this->parser
->getExpressionParser()
->parseExpression();
list($variables, $only, $ignoreMissing) = $this
->parseArguments();
return new Twig_Node_Include($expr, $variables, $only, $ignoreMissing, $token
->getLine(), $this
->getTag());
}