public function Twig_Template::displayBlock

Displays a block.

This method is for internal use only and should never be called directly.

Parameters

string $name The block name to display:

array $context The context:

array $blocks The current set of blocks:

1 call to Twig_Template::displayBlock()
Twig_Template::renderBlock in drupal/core/vendor/twig/twig/lib/Twig/Template.php
Renders a block.

File

drupal/core/vendor/twig/twig/lib/Twig/Template.php, line 127

Class

Twig_Template
Default base class for compiled templates.

Code

public function displayBlock($name, array $context, array $blocks = array()) {
  $name = (string) $name;
  if (isset($blocks[$name])) {
    $b = $blocks;
    unset($b[$name]);
    call_user_func($blocks[$name], $context, $b);
  }
  elseif (isset($this->blocks[$name])) {
    call_user_func($this->blocks[$name], $context, $blocks);
  }
  elseif (false !== ($parent = $this
    ->getParent($context))) {
    $parent
      ->displayBlock($name, $context, array_merge($this->blocks, $blocks));
  }
}