Renders the header bar.

@param context_header $contextheader Header bar object.
@return string HTML for the header bar.
321886
protected function render_context_header(context_header $contextheader) {

        $showheader = empty($this->page->layout_options['nocontextheader']);
        if (!$showheader) {
            return '';
        }

        // All the html stuff goes here.
        $html = html_writer::start_div('page-context-header');

        // Image data.
        if (isset($contextheader->imagedata)) {
            // Header specific image.
            $html .= html_writer::div($contextheader->imagedata, 'page-header-image');
        }

        // Headings.
        if (!isset($contextheader->heading)) {
            $headings = $this->heading($this->page->heading, $contextheader->headinglevel);
        } else {
            $headings = $this->heading($contextheader->heading, $contextheader->headinglevel);
        }

        $html .= html_writer::tag('div', $headings, array('class' => 'page-header-headings'));

        // Buttons.
        if (isset($contextheader->additionalbuttons)) {
            $html .= html_writer::start_div('btn-group header-button-group');
            foreach ($contextheader->additionalbuttons as $button) {
                if (!isset($button->page)) {
                    // Include js for messaging.
                    if ($button['buttontype'] === 'togglecontact') {
                        \core_message\helper::togglecontact_requirejs();
                    }
                    if ($button['buttontype'] === 'message') {
                        \core_message\helper::messageuser_requirejs();
                    }
                    $image = $this->pix_icon($button['formattedimage'], $button['title'], 'moodle', array(
                        'class' => 'iconsmall',
                        'role' => 'presentation'
                    ));
                    $image .= html_writer::span($button['title'], 'header-button-title');
                } else {
                    $image = html_writer::empty_tag('img', array(
                        'src' => $button['formattedimage'],
                        'role' => 'presentation'
                    ));
                }
                $html .= html_writer::link($button['url'], html_writer::tag('span', $image), $button['linkattributes']);
            }
            $html .= html_writer::end_div();
        }
        $html .= html_writer::end_div();

        return $html;
    }
373419
public function render($context)
    {
        if (count($this->class) > 0 && is_array($this->class)) {
            foreach ($this->class as $class) {
                $this->getCell()->addClass($class);
            }
        }
        return $context;
    }
404774
public function render(array $data, ContextInterface $context)
    {
        $data = $this->applyButtonClasses($data);

        return parent::render($data, $context);
    }
198342
def _render_context(self, template, block, **context):
        
        return u''.join(block(template.new_context(context)))
76393
public function render($templateIdent, $context)
    {
        $template = $this->loadTemplate($templateIdent);
        return $this->renderTemplate($template, $context);
    }
178264
public function renderHeader()
    {
        if ($this->min !== 0 || !$this->isAddButtonPositionHeader()) {
            return '';
        }

        $button = $this->isAddButtonPositionHeader() ? $this->renderAddButton() : '';

        $content = [];
        $content[] = Html::tag('td', '&nbsp;');

        if ($this->cloneButton) {
            $content[] = Html::tag('td', '&nbsp;');
        }

        $content[] = Html::tag('td', $button, [
            'class' => 'list-cell__button',
        ]);

        return Html::tag('thead', Html::tag('tr', implode("\n", $content)));
    }
275289
public function renderToolStyleHeaderAddAction()
    {
        $melisKey = $this->params()->fromRoute('melisKey', '');

        $view = new ViewModel();
        $view->melisKey = $melisKey;

        return $view;
    }
963172
public function renderBlock($name, array $context, array $blocks = [], $useBlocks = true)
    {
        return $this->template->renderBlock($name, $context, $blocks, $useBlocks);
    }
992108
public function render($context)
    {
        $values = array();
        if (count($this->vars)) {
            $actualRow = $this->getCell()->getActualRow();
            foreach ($this->vars as $var) {
                $values[] = $actualRow[$var];
            }
        }
        $url = vsprintf($this->url, $values);
        return sprintf('<a  href="%s">%s</a>', $url, $context);
    }
760537
public function render(array $data, ContextInterface $context)
    {
        $data += ['class' => ''];
        $data['class'] .= ' filled-in ';
        $data['class'] = trim($data['class']);

        return parent::render($data, $context);
    }
2152
public function htmlHead($custom_head_markup = '')
    {

        if (!empty($custom_head_markup)) {
            $this->custom_head_markup = $custom_head_markup;
        }

        $html = $this->doc_type . "\n";
        $html .= $this->opening_html_tag . "\n";
        $html .= '<head>' . "\n";
        $html .= '<meta http-equiv="Content-Type" content="text/html; charset=' . $this->charset . '" />' . "\n";
        $html .= '<meta http-equiv="X-UA-Compatible" content="IE=edge" />'."\n";
        $html .= '<title>' . $this->title . '</title>' . "\n";

        if ($this->meta instanceof HeadMeta) {

            foreach (get_object_vars($this->meta) as $key => $val) {
                $html .= '<meta name="' . $key . '" content="' . $val . '" />' . "\n";
            }
        }

        $html .= '<style type="text/css">';

        foreach ($this->styles as $style) {
            if (!preg_match("~^(http|/)~", $style)) {
                $style = '/css/' . $style;
            }
            $html .= "@import '" . $style . "';\n";
        }
        $html .= "</style>\n";

        if (!empty($this->custom_head_markup)) {
            $html.= $this->custom_head_markup;
        }

        $html.= "</head>\n";
        return $html;
    }
1181530
public function render($context)
    {
        $cell = $this->getCell();
        $cell->addClass('editable');
        $cell->addAttr('data-column', $cell->getHeader()->getName());
        return $context;
    }
1042560
public function render($context = [])
    {
        parent::render($context);
        $this->getEngine()->parse($this->template);
        $data = [
            'element' => $this->getElement(),
            'context' => $context,
            'renderer' => $this
        ];
        return $this->getEngine()->process($data);
    }
1274476
public function renderHeader()
    {
        if ($this->title !== false) {
            echo CHtml::openTag('div', $this->htmlHeaderOptions);
            if ($this->title) {
                $this->title = '<h3>' . $this->title . '</h3>';

                if ($this->headerIcon) {
                    $this->title = '<i class="' . $this->headerIcon . '"></i>' . $this->title;
                }

                echo $this->title;
                $this->renderButtons();
            }
            echo CHtml::closeTag('div');
        }
    }
818825
public function toHtml($context = null): string
    {
        return wp_kses(
            $this->unsafeRender($context),
            $this->allowedHtml
        );
    }
1310638
protected function _afterRender(ViewContextInterface $context)
    {
        foreach ($this->getDecorators() as $decorator)
        {
            //Set the content to allow it to be decorated
            $this->setContent($context->result);

            //A fully qualified template path is required
            $layout = $this->qualifyLayout($decorator);

            //Unpack the data (first level only)
            $data = $context->data->toArray();

            $context->result = $this->getTemplate()
                ->setParameters($context->parameters)
                ->render($layout, $data);
        }
    }
1341946
public function renderHead()
    {
        $headers = $this->getTable()->getHeaders();
        $render = '';
        foreach ($headers as $name => $title) {
            $render .= $this->getTable()->getHeader($name)->render();
        }
        $render = sprintf('<tr class="zf-title">%s</tr>', $render);
        return $render;
    }