public function Twig_TokenParser_Include::parse in Translation template extractor 7.3
Same name and namespace in other branches
- 6.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
Throws
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 24
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());
}