Get HTML code for a element.

@return string HTML code for the element.

@SuppressWarnings(PHPMD.UnusedLocalVariable)
966582
public function getHTML()
    {
        $details = $this->getHTMLDetails();
        extract($details);
        
        $options = null;
        foreach ($this['options'] as $optValue => $optText) {
            $options .= "<option value='{$optValue}'"
                . (($this['value'] == $optValue)
                    ? " selected=\"selected\""
                    : null)
                . ">{$optText}</option>\n";
        }

        return <<<EOD
<p>
<label for='$id'>$label</label>$brAfterLabel
<select id='$id'{$class}{$name}{$autofocus}{$required}{$readonly}{$checked}{$title}>
{$options}
</select>
{$messages}
</p>
<p class='cf-desc'>{$description}</p>
EOD;
    }
13628
public function getElementId()
    {
        if ($this->elementId === null) {
            $param = WebDriver_Util::parseLocator($this->locator);
            $commandUri = (null === $this->parent) ? 'element' : "element/{$this->parent->getElementId()}/element";
            $command = $this->driver->factoryCommand($commandUri, WebDriver_Command::METHOD_POST, $param);
            try {
                $result = $this->driver->curl($command);
            } catch (WebDriver_Exception $e) {
                $parentText = (null === $this->parent) ? '' : " (parent: {$this->parent->getLocator()})";
                $e->setMessage("Element not found: {$this->locator}{$parentText}  with error: {$e->getMessage()}");
                throw $e;
            }
            if (!isset($result['value']['ELEMENT'])) {
                $parentText = (null === $this->parent) ? '' : " (parent: {$this->parent->getLocator()})";
                throw new WebDriver_Exception("Element not found: {$this->locator}{$parentText}");
            }
            $this->elementId = $result['value']['ELEMENT'];
        }
        return $this->elementId;
    }
1044287
protected function getHtml()
    {
        array_walk($this->lines, 'trim');
        $html = trim(implode('', $this->lines));
        $this->lines = [];
        return $html;
    }
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;
  }
1033061
public function getCode() {
        $result = '';

        if ($this->options->getRenderContextDirective()) {
            $result .= $this->renderedCode->getContextDirective();
        }
        if ($this->options->getRenderDirectives()) {
            $result .= $this->renderedCode->getDirectives();
        }
        if ($this->options->getRenderGlobalCode()) {
            $result .= $this->renderedCode->getGlobalCode();
        }
        if ($this->options->getRenderMainFunction()) {
            $result .= $this->renderedCode->getMainFunction();
        }

        if ($this->options->getCompress()) {
            $result = $this->compress($result);
        }
        if ($this->options->getIncludeScriptTag()) {
            $result = $this->addScriptTag($result);
        }

        return $result;
    }
1133054
public function html() {
    if (!$this->isMorphed())
      $this->morph();
      
    $html = NULL;
    foreach ($this->elements as $el) {
      $html .= $el->html()."\n";
    }
      
    return $html;
  }
5641
public function getHTML()
    {
        $details = $this->getHTMLDetails();
        extract($details);

        $ret = null;
        foreach ($this['values'] as $val) {
            $id .= $val;
            $item = $onlyValue  = htmlentities($val, ENT_QUOTES, $this->characterEncoding);
            $value = " value='{$onlyValue}'";
            $checked = isset($this['checked']) && $val === $this['checked']
                ? " checked='checked'"
                : null;

            $ret .= <<<EOD
<{$wrapperElement}{$wrapperClass}>
    <input id='$id'{$type}{$class}{$name}{$value}{$autofocus}{$readonly}{$checked}{$title} />
    <label for='$id'>$item</label>
    {$messages}
</{$wrapperElement}>
EOD;
        }

        return <<<EOD
<{$wrapperElement}{$wrapperClass}>
<p class='cf-label'>{$label}</p>
{$ret}
<p class='cf-desc'>{$description}</p>
</{$wrapperElement}>
EOD;
    }
386521
public function getHtml(): string
  {
    $ret = $this->prefix;
    $ret .= Html::generateElement('a', $this->attributes, $this->innerHtml, true);
    $ret .= $this->postfix;

    return $ret;
  }
516192
function toHtml(){
        $html = '';
        if ($this->getMultiple()) {
            // Adding an hidden field forces the browser to send an empty data even though the user did not
            // select any element. This value will be cleaned up in self::exportValue() as it will not be part
            // of the select options.
            $html .= '<input type="hidden" name="'.$this->getName().'" value="_qf__force_multiselect_submission">';
        }
        if ($this->_hiddenLabel){
            $this->_generateId();
            $html .= '<label class="accesshide" for="'.$this->getAttribute('id').'" >'.$this->getLabel().'</label>';
        }
        $html .= parent::toHtml();
        return $html;
    }
1187906
public function render(): string
    {
        $this->tags();

        if ($this->isLink === true) {
            $this->html .= "<a href=\"{$this->link}\">";
        }

        $element_attributes = '';
        foreach ($this->element_attributes as $attribute => $value) {
            if ($attribute == "color") {
                $element_attributes .= "style=\"{$attribute}: $value\"";
            } else {
                $element_attributes .= "{$attribute}=\"{$value}\" ";
            }
        }

        foreach ($this->tags as $i => $tag) {
            if ($i === 0 && strlen($element_attributes) > 0) {
                $this->html .= "<{$tag} " . rtrim($element_attributes) . '>';
            } else {
                $this->html .= "<{$tag}>";
            }
        }

        $this->html .= $this->escape($this->insert);

        foreach (array_reverse($this->tags) as $tag) {
            $this->html .= "</{$tag}>";
        }

        if ($this->isLink === true) {
            $this->html .= '</a>';
        }

        return $this->html;
    }
1244505
public function getHtml(): string
  {
    $html = $this->prefix;
    $html .= $this->value;
    $html .= $this->postfix;

    return $html;
  }
740325
public function renderElements()
    {
        if ($this->isSelfClosing) {
            return '';
        }

        $html = '';

        foreach ($this->elements as $element) {
            $html .= $element;
        }

        return $html;
    }
846074
public function getInputHtml()
    {
        $this->rule->setElementName($this->element->getName());

        if ($this->element->getValue()) {
            /* Hack : reload in a new instance to have element name set.
             *        can not be done in afterLoad of the backend model
             *        since we do not know yet the form structure
             */
            $conditions = $this->element->getValue();
            if (!is_array($conditions)) {
                $conditions = $conditions->getConditions()->asArray();
            }
            $this->rule->getConditions()->loadArray($conditions);
            $this->element->setRule($this->rule);
        }

        $this->input = $this->elementFactory->create('text');
        $this->input->setRule($this->rule)->setRenderer($this->conditions);

        $this->setConditionFormName($this->rule->getConditions(), $this->getElement()->getContainer()->getHtmlId());

        if (is_array($this->getData('url_params'))) {
            $this->setConditionUrlParams($this->rule->getConditions(), $this->getData('url_params'));
        }

        return $this->input->toHtml();
    }
1197076
public function getHTML()
    {
        $e = $this;

        $o = '<div class="atk-layout">';

        $o .= $this->getHTMLHeader();

        $o .= $this->getHTMLSolution();

        //$o.=$this->getHTMLBody();

        $o .= '<div class="atk-layout-row"><div class="atk-wrapper atk-section-small">';
        if (isset($e->more_info)) {
            $o .= '<h3>Additional information:</h3>';
            $o .= $this->print_r($e->more_info, '<ul>', '</ul>', '<li>', '</li>', ' ');
        }
        if (method_exists($e, 'getMyFile')) {
            $o .= '<div class="atk-effect-info">'.$e->getMyFile().':'.$e->getMyLine().'</div>';
        }

        if (method_exists($e, 'getMyTrace')) {
            $o .= $this->backtrace(3, $e->getMyTrace());
        } else {
            $o .= $this->backtrace(@$e->shift, $e->getTrace());
        }

        if (isset($e->by_exception)) {
            $o .= '<h3>This error was triggered by the following error:</h3>';
            if ($e->by_exception instanceof self) {
                $o .= $e->by_exception->getHTML();
            } elseif ($e->by_exception instanceof Exception) {
                $o .= $e->by_exception->getMessage();
            }
        }
        $o .= '</div></div>';

        return $o;
    }
601064
public function getHtml(): string
  {
    $this->attributes['type'] = 'file';
    $this->attributes['name'] = $this->submitName;

    $ret = $this->prefix;
    $ret .= $this->getHtmlPrefixLabel();
    $ret .= Html::generateVoidElement('input', $this->attributes);
    $ret .= $this->getHtmlPostfixLabel();
    $ret .= $this->postfix;

    return $ret;
  }
743489
public function getCode()
    {
        $html = $this->form;

        if ($this->meta->checks['honeypots'])
        {
            $html = $this->createHoneypots($html, $this->honeypots);
        }

        $botoborData =
            '<div style="display: none;">' .
            $this->createInput('hidden', Botobor::META_FIELD_NAME, $this->meta->getEncoded()) .
            '</div>';

        $html = preg_replace('/(<form[^>]*>)/si', '$1'.$botoborData, $html);

        return $html;
    }
1133764
public function getHTMLError() {
        $error = $this->getError();
        if (!is_null($error)) {
            if (is_string($error)) {
                $errorContent = Html::get()->tag('span', $error);
            } elseif (is_array($error)) {
                $errors = array();
                foreach ($error as $message) {
                    $errors[] = Html::get()->tag('li', $message);
                }
                $errorContent = Html::get()->tag('ul', implode("\n", $errors));
            } else {
                $errorContent = '';
            }
            return Html::get()->tag('div', $errorContent, array('class' => 'errors'));
        }
        return '';
    }