generates html for element

@param string $client javascript client library - for validation purpose
@return string generated html for element
558119
public function html($client=null)
	{
		$this->setRendered(true);
		$id = self::idPrefix.$this->id;
		$return  = '<div class="'.self::elementClass."\" id=\"{$id}_container\">";
		$return .= "<label>{$this->title}:</label>";
		$return .= "<div class=\"input\"><ul class=\"inputs-list\">";
		$i = 0;
		foreach($this->items as $item)
		{
			$option = "<li><label>".
				"<input type=\"radio\" name=\"{$this->name}\" ".
				"value=\"{$item->value}\" id=\"{$id}_".$i++."\" ".
				($this->value==$item->value?'checked="checked" ':'').
				($this->readonly===true?'readonly="readonly" ':'').
				($this->disabled===true?'disabled="disabled" ':'').
				"/><span>{$item->label}</span></label></li>";
			if(!is_null($client) and is_callable(array($this, $client)))
			{
				$return .= $this->{$client}($option);
			}
		}
		$return .= "</ul></div></div>";
		return $return;
	}
976746
protected function serializeElement(DOMElement $element)
	{
		$php     = '';
		$elName  = $element->getAttribute('name');
		$id      = $element->getAttribute('id');
		$isVoid  = $element->getAttribute('void');

		// Test whether this element name is dynamic
		$isDynamic = (bool) (strpos($elName, '{') !== false);

		// PHP representation of this element's name
		$phpElName = $this->convertAttributeValueTemplate($elName);

		// NOTE: the element name is escaped by default to account for dynamically-generated names
		$phpElName = 'htmlspecialchars(' . $phpElName . ',' . ENT_QUOTES . ')';

		// If the element name is dynamic, we cache its name for convenience and performance
		if ($isDynamic)
		{
			$varName = '$e' . $id;

			// Add the var declaration to the source
			$php .= $varName . '=' . $phpElName . ';';

			// Replace the element name with the var
			$phpElName = $varName;
		}

		// Test whether this element is void if we need this information
		if ($isVoid === 'maybe')
		{
			$php .= '$v' . $id . '=preg_match(' . var_export(TemplateParser::$voidRegexp, true) . ',' . $phpElName . ');';
		}

		// Open the start tag
		$php .= "\$this->out.='<'." . $phpElName . ';';

		// Serialize this element's content
		$php .= $this->serializeChildren($element);

		// Close that element unless we know it's void
		if ($isVoid !== 'yes')
		{
			$php .= "\$this->out.='</'." . $phpElName . ".'>';";
		}

		// If this element was maybe void, serializeCloseTag() has put its content within an if
		// block. We need to close that block
		if ($isVoid === 'maybe')
		{
			$php .= '}';
		}

		return $php;
	}
760825
public function __toHtml()
    {
        try {
            $this->parse();
            $str = \Library\Helper\Html::writeHtmlTag(
                'script', null, array(
                    'src'=>$this->transformed_data['src'],
                    'type'=>$this->transformed_data['type']
                ), true
            );
        } catch (\Exception $e) {
            $str = $e->getMessage();
        }
        return $str;
    }
723886
public function getHtml()
    {
        if (!$this->exists()) {
            return '';
        }
        switch ($this->type) {
            case 'datetime':
                $html = '<abbr title="'.$this->content->format('c').'">'
                    .(class_exists('WebSyndication\Helper') ?
                        \WebSyndication\Helper::getLocalizedDateString($this->content) : $this->content->format('D j m Y H:i:s')
                    ).'</abbr>';
                break;
            case 'time':
                $html = $this->content->format('H:i:s');
                break;
            case 'email':
                $html = '<a href="mailto:'.$this->content.'" title="Contact this email">'.$this->content.'</a>';
                break;
            case 'url':
                $html = '<a href="'.$this->content.'" title="See online">'.$this->content.'</a>';
                break;
            case 'text':
                $html = $this->xml_value;
                break;
            case 'lang':
                $html = '<abbr title="ISO : '.$this->xml_value.'">'.$this->content.'</abbr>';
                break;
            case 'list':
                $html = '';
                foreach ($this->content as $_ctt) {
                    $html .= (strlen($html) ? ', ' : '').$_ctt->content;
                }
                break;
            default:
                $html = $this->content;
                break;
        }
        return $html;
    }
948594
public function render($content, $data = [])
    {
        if (!$content) {
            return '';
        }

        $html = $this->renderTwig($content, $data);

        $html = Markdown::parseSafe($html);

        return $html;
    }
928582
public function getElementHtml(Request $request)
    {
        $attributes = $this->repository->findMany($request->get('attribute_id'));

        $tmpString = '__RANDOM__STRING__';
        $view = view('avored-ecommerce::attribute.get-element')
            ->with('attributes', $attributes)
            ->with('tmpString', $tmpString);

        return new JsonResponse(['success' => true, 'content' => $view->render()]);
    }
492414
public function getHtmlElements() : string
    {
        $elementString = '';
        /*
         | Build a form and store as string
         */
        foreach ($this->elements[self::$formHolder[self::$formName]] as $key => $val) {
            $elementString .= $val;
        }

        return $elementString;
    }
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();
    }
891199
public function renderElement($element)
    {
        if (is_string($element)) {
            if (($e = $this[$element]) === null && ($e = $this->getButtons()->itemAt($element)) === null) {
                return $element;
            } else {
                $element = $e;
            }
        }
        if ($element->getVisible()) {
            if ($element instanceof CFormInputElement) {
                if ($element->type === 'hidden') {
                    return TbHtml::tag('div', array('class' => 'hidden'), $element->render());
                }
            }
            return $element->render();
        }
        return '';
    }
400343
public function refresh(Client $client)
    {
        $clientId = $client->getId();
        $this->clients[$clientId] = $client;
        $this->removeClientForRequest($clientId, $client->getPreviousRequest());

        $requestId = $client->getRequest();
        if ($requestId  !== null) {
            if (!isset($this->requests[$requestId])) {
                $this->requests[$requestId] = array();
            }
            $this->requests[$requestId][$clientId] = $client;
            $this->clientRequest[$clientId] = $requestId;
        }

        return $this;
    }
385000
public function getCompatibilityOption(Client $client = null): string
    {
        if ($this->compatibilityOption === null) {
            if ($client === null) {
                $client = $client = self::getClient();
            }

            $java_prefer_values = (int) $this->getOption('java_prefer_values');
            $java_log_level = $this->getOption('java_log_level');
            $compatibility = ($client->RUNTIME['PARSER'] === 'NATIVE') ? (0103 - $java_prefer_values) : (0100 + $java_prefer_values);
            if (is_int($java_log_level)) {
                $compatibility |= 128 | (7 & $java_log_level) << 2;
            }
            $this->compatibilityOption = \chr($compatibility);
        }

        return $this->compatibilityOption;
    }
794907
public function client($client = null)
    {
        if ($client === null) {
            return $this->getClient();
        }

        return $this->setClient($client);
    }
346131
public static function toHtmlEntity($input)
    {
        if(is_array($input)){
            foreach ($input as $key=>$value){
                $input[$key]=self::toHtmlEntity($value);
            }
        }else if(is_object($input)){
            $array=get_object_vars($input);
            foreach ($array as $key=>$value){
                $input->$key=self::toHtmlEntity($value);
            }
        }else{
            $input=htmlspecialchars($input);
        }

        return $input;
    }
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;
    }
592762
function toHtml()
    {
        // prevent problems with grouped elements
        $arrayName = str_replace(array('[', ']'), array('__', ''), $this->getName()) . '_values';

        $this->updateAttributes(array(
            'onkeypress' => 'return autocomplete(this, event, ' . $arrayName . ');'
        ));
        if ($this->_flagFrozen) {
            $js = '';
        } else {
            $js = "<script type=\"text/javascript\">\n//<![CDATA[\n";
            if (!defined('HTML_QUICKFORM_AUTOCOMPLETE_EXISTS')) {
                $this->_js .= <<<EOS

/* begin javascript for autocomplete */
function setSelectionRange(input, selectionStart, selectionEnd) {
    if (input.setSelectionRange) {
        input.setSelectionRange(selectionStart, selectionEnd);
    }
    else if (input.createTextRange) {
        var range = input.createTextRange();
        range.collapse(true);
        range.moveEnd("character", selectionEnd);
        range.moveStart("character", selectionStart);
        range.select();
    }
    input.focus();
}

function setCaretToPosition(input, position) {
    setSelectionRange(input, position, position);
}

function replaceSelection (input, replaceString) {
	var len = replaceString.length;
    if (input.setSelectionRange) {
        var selectionStart = input.selectionStart;
        var selectionEnd = input.selectionEnd;

        input.value = input.value.substring(0, selectionStart) + replaceString + input.value.substring(selectionEnd);
		input.selectionStart  = selectionStart + len;
		input.selectionEnd  = selectionStart + len;
    }
    else if (document.selection) {
        var range = document.selection.createRange();
		var saved_range = range.duplicate();

        if (range.parentElement() == input) {
            range.text = replaceString;
			range.moveEnd("character", saved_range.selectionStart + len);
			range.moveStart("character", saved_range.selectionStart + len);
			range.select();
        }
    }
    input.focus();
}


function autocompleteMatch (text, values) {
    for (var i = 0; i < values.length; i++) {
        if (values[i].toUpperCase().indexOf(text.toUpperCase()) == 0) {
            return values[i];
        }
    }

    return null;
}

function autocomplete(textbox, event, values) {
    if (textbox.setSelectionRange || textbox.createTextRange) {
        switch (event.keyCode) {
            case 38:    // up arrow
            case 40:    // down arrow
            case 37:    // left arrow
            case 39:    // right arrow
            case 33:    // page up
            case 34:    // page down
            case 36:    // home
            case 35:    // end
            case 13:    // enter
            case 9:     // tab
            case 27:    // esc
            case 16:    // shift
            case 17:    // ctrl
            case 18:    // alt
            case 20:    // caps lock
            case 8:     // backspace
            case 46:    // delete
                return true;
                break;

            default:
                var c = String.fromCharCode(
                    (event.charCode == undefined) ? event.keyCode : event.charCode
                );
                replaceSelection(textbox, c);
                sMatch = autocompleteMatch(textbox.value, values);
                var len = textbox.value.length;
				
                if (sMatch != null) {
                    textbox.value = sMatch;
                    setSelectionRange(textbox, len, textbox.value.length);
                }
                return false;
        }
    }
    else {
        return true;
    }
}
/* end javascript for autocomplete */

EOS;
                define('HTML_QUICKFORM_AUTOCOMPLETE_EXISTS', true);
            }
            $jsEscape = array(
                "\r"    => '\r',
                "\n"    => '\n',
                "\t"    => '\t',
                "'"     => "\\'",
                '"'     => '\"',
                '\\'    => '\\\\'
            );

            $js .= $this->_js;
            $js .= 'var ' . $arrayName . " = new Array();\n";
            for ($i = 0; $i < count($this->_options); $i++) {
                $js .= $arrayName . '[' . $i . "] = '" . strtr($this->_options[$i], $jsEscape) . "';\n";
            }
            $js .= "//]]>\n</script>";
        }
        return $js . parent::toHtml();
    }
368267
private function renderElement(Element $element) : string
    {
        $label = $element->getLabel();

        if ($label->isEmpty()) {
            return $element->render();
        }

        return $label->render() . $element->render();
    }
1291721
private function renderForm(Form $form) : string
    {
        $html = '';

        foreach ($form->getComponents() as $component) {
            if ($component instanceof Element) {
                $html .= $this->renderElementAsRow($component);
            } elseif ($component instanceof Group) {
                foreach ($component->getElements() as $element) {
                    $html .= $this->renderElementAsRow($element);
                }
            }
        }

        $table = new Tag('table');
        $table->setAttribute('class', $this->class);
        $table->setHtmlContent($html);

        return $table->render();
    }