function MethodCallExpression::compile
Overrides Node::compile
File
-
vendor/
twig/ twig/ src/ Node/ Expression/ MethodCallExpression.php, line 29
Class
Namespace
Twig\Node\ExpressionCode
public function compile(Compiler $compiler) : void {
if ($this->getAttribute('is_defined_test')) {
$compiler->raw('method_exists($macros[')
->repr($this->getNode('node')
->getAttribute('name'))
->raw('], ')
->repr($this->getAttribute('method'))
->raw(')');
return;
}
$compiler->raw('CoreExtension::callMacro($macros[')
->repr($this->getNode('node')
->getAttribute('name'))
->raw('], ')
->repr($this->getAttribute('method'))
->raw(', ')
->subcompile($this->getNode('arguments'))
->raw(', ')
->repr($this->getTemplateLine())
->raw(', $context, $this->getSourceContext())');
}