protected function Twig_Node_Module::compileDisplayBody

2 calls to Twig_Node_Module::compileDisplayBody()
Twig_Node_Module::compileTemplate in drupal/core/vendor/twig/twig/lib/Twig/Node/Module.php
Twig_Node_SandboxedModule::compileDisplayBody in drupal/core/vendor/twig/twig/lib/Twig/Node/SandboxedModule.php
1 method overrides Twig_Node_Module::compileDisplayBody()
Twig_Node_SandboxedModule::compileDisplayBody in drupal/core/vendor/twig/twig/lib/Twig/Node/SandboxedModule.php

File

drupal/core/vendor/twig/twig/lib/Twig/Node/Module.php, line 108

Class

Twig_Node_Module
Represents a module node.

Code

protected function compileDisplayBody(Twig_Compiler $compiler) {
  $compiler
    ->subcompile($this
    ->getNode('body'));
  if (null !== $this
    ->getNode('parent')) {
    if ($this
      ->getNode('parent') instanceof Twig_Node_Expression_Constant) {
      $compiler
        ->write("\$this->parent");
    }
    else {
      $compiler
        ->write("\$this->getParent(\$context)");
    }
    $compiler
      ->raw("->display(\$context, array_merge(\$this->blocks, \$blocks));\n");
  }
}