public function TwigNodeTheme::compile in Components! 8
Compiles the template.
Parameters
\Twig_Compiler $compiler: The compiler.
File
- src/
Template/ TwigNodeTheme.php, line 25
Class
- TwigNodeTheme
- Represents a call to theme() as a Twig node.
Namespace
Drupal\components\TemplateCode
public function compile(\Twig_Compiler $compiler) {
$expression = new \Twig_Node_Expression_Function('theme', new \Twig_Node([
$this
->getNode('theme'),
$this
->getNode('variables'),
]), $this
->getLine());
$compiler
->addDebugInfo($this)
->subcompile(new \Twig_Node_Print($expression, $this
->getLine()));
}