Worker method for the view helper, generates the HTML, the method is private so that we
can echo/print the view helper directly

@return string
976173
protected function render(): string
    {
        $html = '<div class="' . $this->classes() . '" role="alert">';
        if ($this->heading !== null) {
            $html .= '<h' . $this->heading_level . ' class="alert-heading">' .
                $this->heading . '</h' . $this->heading_level . '>';
        }
        $html .= $this->message . '</div>';

        return $html;
    }
407767
public function generateHTML() {
        //create blocktrail pub key QR codes if not already done
        if (!$this->blocktrailPubKeyQRs) {
            $this->processBlocktrailPubKeys();
        }
        $pubKeysHtml = "";
        foreach ($this->blocktrailPubKeyQRs as $pubKey) {
            $pubKeysHtml .= "<img src='{$pubKey['qr']}' />";
        }
        $totalPubKeys = count($this->blocktrailPubKeyQRs);

        $backupInfo = $this->prepareBackupInfo();
        $extraInfo = $this->prepareExtraInfo();

        $passwordEncryptedSecret = null;
        if (isset($this->backupInfo['encrypted_secret'])) {
            $passwordEncryptedSecret = $this->backupInfo['encrypted_secret'];
        }

        $html = self::renderTemplate(__DIR__ . "/../resources/templates/recovery_sheet.html.php", [
            'identifier' => $this->identifier,
            'totalPubKeys' => $totalPubKeys,
            'pubKeysHtml' => $pubKeysHtml,
            'backupInfo' => $backupInfo,
            'extraInfo' => $extraInfo,
            'passwordEncryptedSecret' => $passwordEncryptedSecret,
            'options' => $this->options,
        ]);

        return $html;
    }
893467
function toHTML()
    {

        // get private attributes
        $attributes = $this->get_attributes('label');

        // if access key needs to be showed
        if (preg_match('/(?<!\\\)\$(.{1})/', $attributes['label'], $matches) > 0) {

            // set the requested accesskey
            $this->set_attributes(array('accesskey' => strtolower($matches[1])));

            // make the accesskey visible
            $attributes['label'] = preg_replace('/\$(.{1})/', '<span class="underline">$1</span>', $attributes['label']);

        }

        return '<label ' . $this->_render_attributes() . '>' . preg_replace('/\\\\\$/', '$', $attributes['label']) . '</label>';

    }
799134
public function render(): string
    {
        $variables_for_view = $this->data + self::$shared_data;
        extract($variables_for_view, EXTR_SKIP);

        try {
            ob_start();
            // Do not use require, so we can catch errors for missing files
            include $this->getFilenameForView($this->name);

            return ob_get_clean();
        } catch (Throwable $ex) {
            ob_end_clean();
            throw $ex;
        }
    }
986361
public function RenderTemplate () {
		$formViewScript = $this->form->GetViewScript();
		return $this->Render(
			static::$formsDir,
			is_bool($formViewScript) ? $this->form->GetId() : $formViewScript
		);
	}
85207
public function render()
    {
        // Always add this class
        $this->addClass('time');

        // Create HTML string
        $html = parent::render();

        // Convert the value to a mysql friendly format or leave null.
        $mysql_date = $this->value ?
            date(Library\Utils\Constants::MYSQL_TIME, strtotime($this->value)) :
            null;

        // Add a hidden field that will contain the mysql value, for storing in db
        $html .= HtmlInput::hidden($this->name, $mysql_date)->id($this->name);

        // Return the string
        return $html;
    }
9008
private function render()
    {
        $output = '';

        foreach ($this->jobs as $job) {
            $output .= $this->getTaskDefinition($job);
        }

        return $output;
    }
929039
function toHtml()
    {
        $this->_generateId(); // Seems to be necessary when this is used in a group.
        if (0 == strlen($this->_text)) {
            $label = '';
        } elseif ($this->_flagFrozen) {
            $label = $this->_text;
        } else {
            $label = '<label for="' . $this->getAttribute('id') . '">' . $this->_text . '</label>';
        }
        return HTML_QuickForm_input::toHtml() . $label;
    }
1237368
function render()
    {
        if (!isset($this->result)) {
            $this->usageError('Nothing to render!');
        }

        $baseViewFilePath = dirname(__FILE__).DIRECTORY_SEPARATOR.'..'.DIRECTORY_SEPARATOR.'views';

        if (!empty($_SERVER['argv'])) {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'console'.DIRECTORY_SEPARATOR.'index.php';
        } else {
            $viewFilename = $baseViewFilePath.DIRECTORY_SEPARATOR.'web'.DIRECTORY_SEPARATOR.'index.php';
        }

        $this->renderViewFile($viewFilename, $this->result);
    }
1232850
public function html() {
        global $OUTPUT;

        if (!empty($this->initerrors)) {
            $warnings = '';
            foreach ($this->initerrors as $mesg) {
                $warnings .= $OUTPUT->notification($mesg);
            }
            return $warnings;
        }
        $table = new html_table();

        $table->head = $this->headers();

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

        // To be used for extra formatting.
        $this->index = 0;
        $this->total = count($this->items);

        foreach ($this->items as $item) {
            if ($this->index >= ($this->perpage * $this->page) &&
                $this->index < ($this->perpage * ($this->page + 1))) {
                $table->data[] = $this->format_line($item);
            }
            $this->index++;
        }

        $underlying = get_class($this);

        $data = new stdClass();
        $data->table = $table;
        $data->instance = $this;

        $buttonattr = array('class' => 'singleview_buttons submit');
        $buttonhtml = implode(' ', $this->buttons());

        $buttons = html_writer::tag('div', $buttonhtml, $buttonattr);
        $selectview = new select($this->courseid, $this->itemid, $this->groupid);

        $sessionvalidation = html_writer::empty_tag('input',
            array('type' => 'hidden', 'name' => 'sesskey', 'value' => sesskey()));

        $html = $selectview->html();
        $html .= html_writer::tag('form',
            $buttons . html_writer::table($table) . $this->bulk_insert() . $buttons . $sessionvalidation,
            array('method' => 'POST')
        );
        $html .= $selectview->html();
        return $html;
    }
1247257
public function output_html() {
        $adminroot = admin_get_root();
        $return = '<fieldset>'."\n".'<div class="clearer"><!-- --></div>'."\n";
        foreach($this->settings as $setting) {
            $fullname = $setting->get_full_name();
            if (array_key_exists($fullname, $adminroot->errors)) {
                $data = $adminroot->errors[$fullname]->data;
            } else {
                $data = $setting->get_setting();
                // do not use defaults if settings not available - upgrade settings handles the defaults!
            }
            $return .= $setting->output_html($data);
        }
        $return .= '</fieldset>';
        return $return;
    }
191743
public function getHtml()
	{
		$s = '';
		foreach ($this->children as $child) {
			if (is_object($child)) {
				$s .= $child->render();
			} else {
				$s .= $child;
			}
		}

		return $s;
	}
740256
function toHtml()
    {
        $tabs    = $this->_getTabs();
        $name    = $this->getPrivateName();
        $strHtml = '';

        foreach ($this->_values as $key => $val) {
            for ($i = 0, $optCount = count($this->_options); $i < $optCount; $i++) {
                if ($val == $this->_options[$i]['attr']['value']) {
                    $strHtml .= $tabs . '<input' . $this->_getAttrString(array(
                        'type'  => 'hidden',
                        'name'  => $name,
                        'value' => $val
                    )) . " />\n" ;
                }
            }
        }

        return $strHtml;
    }
16329
function toHtml(){
        global $OUTPUT;

        $managelink = '';
        if (has_capability('moodle/tag:manage', context_system::instance()) && $this->showstandard) {
            $url = new moodle_url('/tag/manage.php', array('tc' => $this->get_tag_collection()));
            $managelink = ' ' . $OUTPUT->action_link($url, get_string('managestandardtags', 'tag'));
        }

        return parent::toHTML() . $managelink;
    }
148741
private function render() : string
    {
        $styles = $this->styles();
        if (strlen($styles) > 0) {
            $styles = 'style="' . $this->view->escapeHtmlAttr(trim($styles)) . '"';
        }

        return '
            <div class="progress">
                <div class="progress-bar' . $this->classes() . '" role="progressbar" ' . $styles .
            ' aria-valuenow="' . $this->value . '" aria-valuemin="0" aria-valuemax="100">' .
            (($this->label !== null) ? $this->view->escapeHtml($this->label) : null) . '</div>
            </div>';
    }
1338310
public function render()
    {
        $uid = helpers_Random::generateString(24);

        $this->addClass('viewable-hiddenbox-input');
        $this->addAttribute('data-identifier', $uid);

        $value = _dh($this->value);

        $html = <<<HTML
<span class="viewable-hiddenbox">
    {$this->renderLabel()}
    <input type='password' name='{$this->name}' id='{$this->name}' {$this->renderAttributes()} value='{$value}'/>
    <span class="viewable-hiddenbox-toggle" data-identifier="{$uid}"></span>
</span>
HTML;

        $script = <<<SCRIPT
<script type="text/javascript">
    (function() {
        var input = document.querySelector('input[data-identifier="$uid"]'),
            toggle = document.querySelector('.viewable-hiddenbox-toggle[data-identifier="$uid"]'),
            
            iconView = document.createElement('span'),
            iconHide = document.createElement('span');
        
        var show = function() {
            if (iconView.parentElement) {
                toggle.removeChild(iconView);
            }
            if (!iconHide.parentElement) {
                toggle.appendChild(iconHide);
            }
            input.type = 'text';
            input.autocomplete = 'off';
            window.addEventListener('mousedown', autoHide); // make sure always submit the form with an password input
            input.focus();
        };
        
        var hide = function() {
            if (!iconView.parentElement) {
                toggle.appendChild(iconView);
            }
            if (iconHide.parentElement) {
                toggle.removeChild(iconHide);
            }
            input.type = 'password';
            input.autocomplete = 'on';
            window.removeEventListener('mousedown', autoHide);
        };
        
        var autoHide = function(event) {
            if (!event.target.isSameNode(input) && !event.target.isSameNode(iconHide) && !event.target.isSameNode(toggle)) {
                hide();
            }
        };
        
        iconView.classList.add('icon-preview');
        iconHide.classList.add('icon-eye-slash');
        hide();
        
        toggle.addEventListener('click', function() {
            if (input.type === 'password') {
                show();
            } else {
                hide();
            }
        });
    })();
</script>
SCRIPT;

        return (string) ($html . $script);
    }
294007
public function getHtml(): string
  {
    if (!isset($this->attributes['action']))
    {
      $this->attributes['action'] = Abc::$request->getRequestUri();
    }

    $this->prepare();

    $html = $this->getHtmlStartTag();

    $html .= $this->getHtmlBody();

    $html .= $this->getHtmlEndTag();

    return $html;
  }