function Template::renderParentBlock
Renders a parent block.
This method is for internal use only and should never be called directly.
Parameters
string $name The block name to render from the parent:
array $context The context:
array $blocks The current set of blocks:
Return value
string The rendered block
File
-
vendor/
twig/ twig/ src/ Template.php, line 155
Class
- Template
- Default base class for compiled templates.
Namespace
TwigCode
public function renderParentBlock($name, array $context, array $blocks = []) : string {
if (!$this->useYield) {
if ($this->env
->isDebug()) {
ob_start();
}
else {
ob_start(function () {
return '';
});
}
$this->displayParentBlock($name, $context, $blocks);
return ob_get_clean();
}
$content = '';
foreach ($this->yieldParentBlock($name, $context, $blocks) as $data) {
$content .= $data;
}
return $content;
}