Generate HTMl output

See {@link \ValidFormBuilder\Element::toHtml()}

@see \ValidFormBuilder\Element::toHtml()
172396
public function toHtmlInternal($value = null)
    {
        $strSelected = "";
        if ($this->__selected && is_null($value)) {
            $strSelected = " selected=\"selected\"";
        }

        if ($value == $this->__value) {
            $strSelected = " selected=\"selected\"";
        }

        $strOutput = "<option value=\"{$this->__value}\"{$strSelected} {$this->__getMetaString()}>{$this->__label}</option>\n";

        return $strOutput;
    }
705263
public function toHtml()
    {
        $this->config['html'] = $this->config['text'];
        unset($this->config['text']);
        $this->flash();

        return $this;
    }
277204
public function getDataRowHTML()
    {
        $output = [];
        foreach ($this->columns as $name => $column) {

            // If multiple formatters are defined, use the first for the header cell

            if (!is_int($name)) {
                $field = $this->model->getElement($name);
            } else {
                $field = null;
            }

            if (!is_array($column)) {
                $column = [$column];
            }

            // we need to smartly wrap things up
            $cell = null;
            $cnt = count($column);
            $td_attr = [];
            foreach ($column as $c) {
                if (--$cnt) {
                    $html = $c->getDataCellTemplate($field);
                    $td_attr = $c->getTagAttributes('body', $td_attr);
                } else {
                    // Last formatter, ask it to give us whole rendering
                    $html = $c->getDataCellHTML($field, $td_attr);
                }

                if ($cell) {
                    if ($name) {
                        // if name is set, we can wrap things
                        $cell = str_replace('{$'.$name.'}', $cell, $html);
                    } else {
                        $cell = $cell.' '.$html;
                    }
                } else {
                    $cell = $html;
                }
            }

            $output[] = $cell;
        }

        return implode('', $output);
    }
578514
public function toHtml() {
        global $OUTPUT;

        if ($this->_flagFrozen) {
            return $this->getFrozenHtml();
        } else {
            $value = preg_replace("/(\r\n|\n|\r)/", '&#010;', $this->getValue());

            return $this->_getTabs() .
                $OUTPUT->print_textarea($this->getName(), $this->getAttribute('id'), $value, $this->_options['rows'],
                    $this->_options['cols']);
        }
    }
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;
    }
1197862
public function outputHtml()
    {
        echo '<div style="display: block; margin: 5px; padding: 5px; background-color: #fff; border: 1px solid black; z-index: 999999999; position:relative;">';
        echo '<h3 style="font-size: 14px; margin: 3px">' . $this->_backtrace[0]['file'] . ':' . $this->_backtrace[1]['function'] . ':' . $this->_backtrace[0]['line'] . '</h3>';
        $backtrace = array_slice($this->_backtrace, 1, $this->_showSteps);
        foreach ($backtrace as $bt) {
            if (!isset($bt['file'])) {
                continue;
            }
            echo '<div style="font-size: 12px; margin: 1px">' . $bt['file'] . ':' . $bt['function'] . ':' . $bt['line'] . '</div>';
        }
        echo '<hr />';
        echo self::dump($this->_var, $this->_depth, true);
        echo '</div>';
    }
131469
public function toHtml()
	{
		$html = '';
		
		// if this group isn't a destination
		if ( ! $this->isDestination()) {
			// set the first element's "old" style to the group's style
			$oldStyle = $this->style;
			
			// define a flag indicating whether or not this group is the root group
			//
			// setting this flag here feel a little hackish!
			// however, the first element in the first group is different than the first
			//     element in any other group
			//
			$isFirstGroup = empty($this->parent);
			
			// a flag indicating whether or not the element is the first "textual" element
			//     in the group (i.e., control word with a special symbol, an actual text
			//     element, etc)
			//
			$isFirstTextualElement = true;
			
			// loop through the group's children
			foreach ($this->children as $child) {
				// if the child is a textual element
				$string = $child->format('html');
				if ( ! empty($string)) {
					// get the child's style
					$newStyle = $child->getStyle();
					// if the child is the first textual element in the first (aka, "root") group
					if ($isFirstGroup && $isFirstTextualElement) {
						// open the document's first section, paragraph, and character tags
						$html .= '<section style="'.$newStyle->getSection()->format('css').'">'
							 . '<p style="'.$newStyle->getParagraph()->format('css').'">'
							 . '<span style="'.$newStyle->getCharacter()->format('css').'">';
						// set the flag to false
						$isFirstTextualElement = false;
					} else {
						// otherwise, the child is not the first textual element in the root group 
						//    and we only close and open the section, paragraph, and character tags
						//    if the style has changed between elements
						//
						// keep in mind, a section takes precedence over a paragraph and a character;
						//     a paragraph takes precedence over a character; so on and so forth
						//
						if ($oldStyle->getSection() != $newStyle->getSection()) {
							$html .= '</span></p></section>'
								. '<section style="'.$newStyle->getSection()->format('css').'">'
								. '<p style="'.$newStyle->getParagraph()->format('css').'">'
								. '<span style="'.$newStyle->getCharacter()->format('css').'">';
						} elseif ($oldStyle->getParagraph() != $newStyle->getParagraph()) {
							$html .= '</span></p>'
								. '<p style="'.$newStyle->getParagraph()->format('css').'">'
								. '<span style="'.$newStyle->getCharacter()->format('css').'">';
						} elseif ($oldStyle->getCharacter() != $newStyle->getCharacter()) {
							$html .= '</span>'
								. '<span style="'.$newStyle->getCharacter()->format('css').'">';
						}
					}
					
					// append the html string
					$html .= $string;
					
					// set the "old" style to the current element's style for the next iteration
					$oldStyle = $newStyle;
				}
			}
		}
		
		return $html;
	}
671573
protected function _real_toHtml() {
        if ( ! $this->_directCall) {
            $this->_directCall = 'getGroupedHtml';
        }
        switch ($this->_directCall) {
            case 'getHtml':
                $html = parent::getHtml($this->_singleRenderType);
                $this->_singleRenderType = self::NO_SINGLE_RENDER_TYPE;
                break;
            case 'getGroupedHtml':
            default:
                $html = parent::getGroupedHtml();
                break;
        }
        return $html;
    }
1226082
public function render()
    {
        $separator = $this->renderSeparator();
        $output    = $this->isTitleFirst()
            ? $this->renderTitleFirst($separator)
            : $this->renderTitleLast($separator);

        return Element::withTag('title')->html(
            $this->prepareTitleOutput($output)
        )->toHtml();
    }
1186433
public function outputElement() : string
    {
        $atts = [];
        foreach ($this->attributes as $name => $value) {
            $atts[] = $name . '="' . $value . '"';
        }
        $return = '<textarea ' . implode(' ', $atts) . '>' . "\n";
        $return .= $this->getValue();
        $return .= '</textarea>';
        return $return;
    }
414540
function toHtml() {
        include_once('HTML/QuickForm/Renderer/Default.php');
        $renderer = new HTML_QuickForm_Renderer_Default();
        $renderer->setElementTemplate('{element}');
        parent::accept($renderer);
        return $renderer->toHtml();
    }
396908
public function render(): string
    {
        $html = '';

        $add_span = false;
        if (count($this->attributes) > 0) {
            $add_span = true;
        }

        if ($this->preNewLine() === true) {
            $html .= "<br />\n";
        }

        if ($add_span === false) {
            $html .= $this->escape($this->insert);
        } else {
            $html .= '<span';
            foreach($this->attributes as $attribute => $value) {
                $html .= " {$attribute}=\"{$value}\"";
            }
            $html .= ">{$this->escape($this->insert)}</span>";
        }

        if ($this->newLine() === true) {
            $html .= "<br />\n";
        }

        return $html;
    }
636977
public function buildHtml()
	{
		$list	= array();
		$divs	= array();
		foreach( $this->steps as $nr => $step )
		{
			$id		= $this->id."_link".$nr;
			$list[]	= UI_HTML_Elements::ListItem( $step['label'], 0, array( 'id' => $id ) );
			$id		= $this->id."_".$nr;
			$divs[] = UI_HTML_Tag::create( 'div', $step['content'], array( 'id' => $id ) );
		}
		$list	= UI_HTML_Elements::unorderedList( $list );
		$divs	= implode( "\n", $divs );
		$div	= UI_HTML_Tag::create( 'div', "\n".$list.$divs."\n", array( 'id' => $this->id ) );
		return $div;
	}
34328
public function output()
    {
        if ( $this->session->has('flashMessages') ) {
            $flashMessages = $this->session->get('flashMessages');
            $this->session->set('flashMessages', []);
            $html = null;
            foreach ($flashMessages as $message) {
                $html .= "<div class='". $message['type'] . "'>" . $message['message'] . "</div>";
            }
            return $html;
        }
    }
191743
public function getHtml()
	{
		$s = '';
		foreach ($this->children as $child) {
			if (is_object($child)) {
				$s .= $child->render();
			} else {
				$s .= $child;
			}
		}

		return $s;
	}
954248
public function __toHtml()
    {
        try {
            $str = '';
            foreach ($this->getData() as $type=>$statements) {
                foreach ($statements as $statement) {
                    $str .= $statement->__toHtml();
                }
            }
        } catch (\Exception $e) {
            $str = $e->getMessage();
        }
        return $str;
    }
1305310
function toHtml()
    {
        include_once('HTML/QuickForm/Renderer/Default.php');
        $renderer = new HTML_QuickForm_Renderer_Default();
        $renderer->setElementTemplate('{element}');
        $this->accept($renderer);
        return $renderer->toHtml();
    }