Render a named block from the parent view.

@param OutputBuffer $out
@param string $name Name of the block to be rendered.

@throws \RuntimeException When no parent view is available.
181355
public function renderParentBlock(OutputBuffer $out, $name)
	{
		if($this->getParent() === NULL)
		{
			throw new \RuntimeException('Cannot render parent block because no template is inherited');
		}
		
		$this->parent->renderBlock($out, $name);
	}
614159
public function parent($name)
    {
        $placeholder = $this->placeholder($name);
        return isset($this->blocks[$placeholder]) ? $this->blocks[$placeholder] : '';
    }
1334030
public function render($name, $args = []) {

        if(strstr($name, '::')) {

            $name = explode('::', $name);
        
        } else {

            $name = [$name, strtolower($name)];
        }


        if($this->set('module[controller]', $name[0])) {

            $module = $this->get('module');

            if(isset($module['name'])) {

                ob_start();

                if(method_exists($instance = $this->controller($module['name'], $name[0]), $name[1])) {

                    if($ref = new \ReflectionMethod($instance, $name[1])) {

                        $ref->invokeArgs($instance, $args);
                    }
                }

                $content = ob_get_contents();

                ob_end_clean();


                return $content;
            }
        }
    }
382017
public function render(string $name, $params = []) : string
    {
        $params = $this->normalizeParams($params);
        return $this->template->make($name, $params)->render();
    }
333242
protected function blockChildren(OutputBlock $block)
    {
        foreach ($block->children as $child) {
            $this->block($child);
        }
    }
1295798
public function run($name, OutputInterface $output = null)
    {
        if (!$this->has($name)) {
            throw new InvalidArgumentException("No runner service registered for provided name.");
        }
        /* @var $runner WorkerRunnerInterface */
        $runner = $this->runners[$name]['runner'];
        $runner->run($this->runners[$name]['options'], $output);
    }
1235528
public function open($name)
    {
        $args = func_num_args() > 1 ? array_slice(func_get_args(), 1) : [];
        is_string($name) and call_user_func([$this->blocks, 'open'], $name, $args);
    }
219789
protected function renderNestedNodes(OutputBuffer $out)
	{
		foreach((array)$this->__nestedNodes as $node)
		{
			$node($out);
		}
		
		return $out;
	}
1166118
protected function _renderNode($type, $name, $data)
    {
        $typeAlias = str_replace(' ', '-', strtolower($type));
        ?>
        <li class="jbchild">
            <div class="jbelement">
                <span class="jbname"><?php echo $name; ?></span>
                (<span class="jbtype jbtype-<?php echo $typeAlias; ?>"><?php echo $type; ?></span>)
                <span class="jbvalue"><?php echo $data; ?></span>
            </div>
        </li>
    <?php
    }
65656
public function block($name = null)
    {
        if ($name === null) {
            $this->addBlock($this->currentBlock, ob_get_clean());
            $this->currentBlock = '';
            ob_clean();
        } else {
            $this->currentBlock = $name;
            ob_start();
        }
    }
1254583
public static function make($name, $data = []): string
    {
        $view = new static($name, $data);

        DebugBar::addView($name, $data);

        return $view->render();
    }
1253344
protected function showBlock($name, $remove = true)
    {
        if (isset($this->block_content[$name])) {
            echo $this->block_content[$name];

            if ($remove) {
                unset($this->block_content[$name]);
            }
        }
    }
983131
private function renderParentBlock(Template $parent, $blockName, Context $context)
    {
        while ($parent->parentTemplate) {
            $parent = $this->environment->load($parent->parentTemplate);
            if (isset($parent->blocks[ $blockName ])) {
                $parent->blocks[$blockName]($context);

                return;
            }
        }

        throw new \RuntimeException("Block {$blockName} was not found.");
    }
805536
public function block($name)
    {
        $this->currentBlock = $name;

        $this->getBlockQueue()->push($name);

        // Start an output buffer.
        ob_start();
    }
483784
public function render($name)
    {
        return $this->helper->getRenderer($name)->render($this->get($name));
    }
625357
private function router($name, $val)
    {
        // Route object
        if (is_object($val)) {
            $this->renderObj($name, $val);
        }

        // Route indexed array
        if (is_array($val) && Utils::isArrayIndexed($val)) {
            $this->renderArrIndexed($name, $val);
        }

        // Route array with keys
        if (is_array($val) && !Utils::isArrayIndexed($val)) {
            $this->renderArrKeys($name, $val);
        }

        // Route strings/other
        if (!is_array($val) && !is_object($val)) {
            // Add to $this->code
            $this->renderResult($name, $val);

            // Clear out $this-code
            $this->code = '';

            // Exit
            return;
        }
    }
759697
public function block($name, $options=[]) {

        if (!isset($this->blocks[$name])) return null;

        $options = \array_merge([
            'print' => true
        ], $options);

        $block = \implode("\n", $this->blocks[$name]);

        if ($options['print']){
            echo $block;
        }

        return $block;
    }