Return the HTML markup for Javascript code

@brief Brief
@return string
192251
public function toJavascript()
  {
    ob_start();
    ?>
    <script type="text/javascript">
      jQuery( function( $ )
      {
        "use strict";

        Morris.<?php echo $this->__chart_type ?>(
          <?php echo $this->toJSON() ?>
        );
      } );
    </script>
    <?php
    $buffer = ob_get_contents();
    ob_end_clean();

    return $buffer;
  }
1107532
public function toHtml() {

        // Add the class at the last minute.
        if ($this->get_force_ltr()) {
            if (!isset($this->_attributes['class'])) {
                $this->_attributes['class'] = 'text-ltr';
            } else {
                $this->_attributes['class'] .= ' text-ltr';
            }
        }

        $this->_generateId();
        if ($this->_flagFrozen) {
            return $this->getFrozenHtml();
        }
        $html = $this->_getTabs() . '<input' . $this->_getAttrString($this->_attributes) . ' />';

        if ($this->_hiddenLabel){
            return '<label class="accesshide" for="'.$this->getAttribute('id').'" >'.
                        $this->getLabel() . '</label>' . $html;
        } else {
             return $html;
        }
    }
937457
public function getScript()
    {
        if(count($this->aScripts) == 0)
        {
            return '';
        }
        if(($this->sContext))
        {
            $js = "$('" . $this->sSelector . "', $('" . $this->sContext . "'))";
        }
        else
        {
            $js = "$('" . $this->sSelector . "')";
        }
        return $js . '.' . implode('.', $this->aScripts);
    }
164403
protected function getPreviewCode()
    {
        $file = file($this->stack['file']);
        $line = $this->stack['line'];
        $_line = $line - 1;
        if ($_line - 5 >= 0) {
            $start = $_line - 5;
            $end = $_line + 5;
        } else {
            $start = $_line;
            $end = $line;
        }
        for ($i = $start; $i <= $end; $i++) {
            if (!isset($file[$i])) {
                break;
            }
            $text = trim($file[$i]);
            if ($i === $_line) {
                $this->stack['previewCode'] .=
                    "<span style='background:red' class='line'>".($i + 1).'</span>'.
                    "<span style='background:red'>".$text.'</span><br>';
                continue;
            }
            $this->stack['previewCode'] .=
                "<span class='line'>".($i + 1).'</span>'.
                '<span>'.$text.'</span><br>';
        }
    }
475133
public function getCode(): string
  {
    $lines       = [];
    $indentLevel = 0;

    foreach ($this->lines as $line)
    {
      $mode = $this->indentationMode($line);

      // Increment or decrement indentation level.
      if ($mode & self::C_INDENT_INCREMENT_BEFORE)
      {
        $indentLevel++;
      }
      if ($mode & self::C_INDENT_DECREMENT_BEFORE)
      {
        $indentLevel = max(0, $indentLevel - 1);
      }
      if ($mode & self::C_INDENT_DECREMENT_BEFORE_DOUBLE)
      {
        $indentLevel = max(0, $indentLevel - 2);
      }

      // If the line is a separator shorten the separator.
      if ($this->separator!==null && $line==$this->separator)
      {
        $line = $this->shortenSeparator($this->width - $this->indentation * $indentLevel);
      }

      // Append the line with indentation.
      $lines[] = $this->addIndentation($line, $indentLevel);

      // Increment or decrement indentation level.
      if ($mode & self::C_INDENT_INCREMENT_AFTER)
      {
        $indentLevel++;
      }
      if ($mode & self::C_INDENT_DECREMENT_AFTER)
      {
        $indentLevel = max(0, $indentLevel - 1);
      }
    }

    if (empty($lines))
    {
      return '';
    }

    return implode(PHP_EOL, $lines).PHP_EOL;
  }
1093766
public function getHTML()
    {
        $details = $this->getHTMLDetails();
        extract($details);

        $label = isset($this['label'])
            ? " value='{$this['label']}'"
            : null;
        $classSubmit = isset($this['class-submit'])
            ? " class='{$this['class-submit']}'"
            : null;

        return <<<EOD
<{$wrapperElement}{$wrapperClass}>
<input id='$id' type='search'{$class}{$name}{$value}{$autofocus}{$required}{$readonly}{$placeholder}/>
<input id='do-{$id}' type='submit'{$classSubmit}{$label}{$readonly}{$title}/>
</{$wrapperElement}>
<p class='cf-desc'>{$description}</p>
EOD;
    }
490716
public function getHTML()
    {
        $details = $this->getHTMLDetails();
        extract($details);
        
        $name = " name='{$this['name']}[]'";
        $options = null;
        $selectedValues = is_array($this['checked']) ? $this['checked'] : [];
        
        foreach ($this['options'] as $optValue => $optText) {
            $selected = in_array($optValue, $selectedValues)
                ? " selected"
                : null;
            $options .= "<option value='{$optValue}'{$selected}>{$optText}</option>\n";
        }

        return <<<EOD
<p>
<label for='$id'>$label</label>$brAfterLabel
<select id='$id'{$size}{$class}{$name}{$autofocus}{$required}{$readonly}{$title} multiple>
{$options}
</select>
{$messages}
</p>
<p class='cf-desc'>{$description}</p>
EOD;
    }
1169232
public function toHtml()
    {
        $this->setMeta("class", "vf__notes");

        $this->setConditionalMeta();
        $strOutput = "<div{$this->__getMetaString()}>\n";

        if (! empty($this->__header)) {
            $strOutput .= "<h4{$this->__getLabelMetaString()}>$this->__header</h4>\n";
        }

        if (! empty($this->__body)) {
            if (preg_match("/<p.*?>/", $this->__body) > 0) {
                $strOutput .= "{$this->__body}\n";
            } else {
                $strOutput .= "<p>{$this->__body}</p>\n";
            }
        }
        $strOutput .= "</div>\n";

        return $strOutput;
    }
182167
protected function settingsHtml(): string
    {
        //AdminBar::$plugin->bar->clearAdminBarCache();

        $settings = $this->getSettings();

        // Create one empty table row if non are present
        if (empty($settings->customLinks)) {
            $settings['customLinks'] = [['','',0]];
        }

        $adminBarWidgets = AdminBar::$plugin->bar->getAdminBarWidgetsFromPlugins();

        return Craft::$app->view->renderTemplate(
            'admin-bar/settings',
            [
                'widgets'  => $adminBarWidgets,
                'settings' => $settings
            ]
        );
    }
1003918
public function getHTML() {
        $tag = "<" . $this->name;
        $q = $this->quoteType;

        //build attribute strings
        foreach( $this->attrs as $name=>$value ) {
            //if true, such as CHECKED, we just add the name
            if( $value === true ) {
                $tag .= " $name";
            } else if( is_string( $value ) ) { //if it's a string, we add attr="value"
                $tag .= " {$name}={$q}{$value}{$q}";
            }
        }

        //short tag? close it and return
        if( $this->isShortTag ) {
            $tag .= ' />';
            
            return $tag;
        }

        //not a short tag, close it
        $tag .= '>';

        //add the children if they exist
        if( $this->hasChildren() ) {
            foreach( $this->getChildren() as $child ) {
                $tag .= $child->getHTML();
            }
        }

        //closing tag
        $tag .= "</{$this->name}>";

        return $tag;
    }
1261599
public function getHtml() {
	   if ($this->getPageTotal() < 2) {
	       return null;
       }
       return str_ireplace(array(
				'{total}',
				'{pageSize}',
				'{start}',
				'{end}',
				'{pageTotal}',
				'{previous}',
				'{next}', 
				'{list}',
				'{goto}',
		), array(
				$this->get('total'),
				$this->setPageSize(),
				$this->getStart(),
				$this->getEnd(),
				$this->pageTotal,
				$this->getPrevious(),
				$this->getNext(),
				$this->getPageList(),
				$this->getGoToPage(),
		), $this->get('template'));
	}
1037908
protected function getInlineJavaScript()
    {
        $javascript = sprintf(
            "var %s_obj = new %s(%s, %s);",
            $this->id,
            $this->getJavaScriptClass(),
            SwatString::quoteJavaScriptString($this->id),
            SwatString::quoteJavaScriptString($this->connection_close_uri)
        );

        if ($this->autofocus) {
            $focusable = true;
            if ($this->default_focused_control === null) {
                $control = $this->getFirstDescendant('SwatControl');
                if ($control === null) {
                    $focusable = false;
                } else {
                    $focus_id = $control->getFocusableHtmlId();
                    if ($focus_id === null) {
                        $focusable = false;
                    }
                }
            } else {
                $focus_id = $this->default_focused_control->getFocusableHtmlId();

                if ($focus_id === null) {
                    $focusable = false;
                }
            }

            if ($focusable) {
                $javascript .= "\n{$this->id}_obj.setDefaultFocus('{$focus_id}');";
            }
        }

        if (!$this->autocomplete) {
            $javascript .= "\n{$this->id}_obj.setAutocomplete(false);";
        }

        return $javascript;
    }
261062
protected function getInlineJavaScript()
    {
        $resizeable = $this->resizeable ? 'true' : 'false';
        return sprintf(
            "var %s_obj = new SwatTextarea('%s', %s);",
            $this->id,
            $this->id,
            $resizeable
        );
    }
897949
public function html()
    {
        $script = "var formData = $(\"select.searchable\").serializeArray(); $.each(formData, function(i, o){data[o.name] = o.value;});";

        return $this->builder()
                    ->columns($this->getColumns())
                    ->minifiedAjax('', $script)
                    ->parameters($this->getBuilderParameters());
    }
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;
    }
537028
public function getScript()
    {
        $sJsCode = '';
        switch($this->sType)
        {
        case Jaxon::FORM_VALUES:
            $sJsCode = $this->getJsCall('getFormValues', $this->xValue);
            break;
        case Jaxon::INPUT_VALUE:
            $sJsCode = $this->getJsCall('$', $this->xValue) . '.value';
            break;
        case Jaxon::CHECKED_VALUE:
            $sJsCode = $this->getJsCall('$', $this->xValue) . '.checked';
            break;
        case Jaxon::ELEMENT_INNERHTML:
            $sJsCode = $this->getJsCall('$', $this->xValue) . '.innerHTML';
            break;
        case Jaxon::QUOTED_VALUE:
            $sJsCode = $this->getQuotedValue(addslashes($this->xValue));
            break;
        case Jaxon::BOOL_VALUE:
            $sJsCode = ($this->xValue) ? 'true' : 'false';
            break;
        case Jaxon::PAGE_NUMBER:
            $sJsCode = (string)$this->xValue;
            break;
        case Jaxon::NUMERIC_VALUE:
            $sJsCode = (string)$this->xValue;
            break;
        case Jaxon::JS_VALUE:
            if(is_array($this->xValue) || is_object($this->xValue))
            {
                // Unable to use double quotes here because they cannot be handled on client side.
                // So we are using simple quotes even if the Json standard recommends double quotes.
                $sJsCode = str_replace(['"'], ["'"], json_encode($this->xValue, JSON_HEX_APOS | JSON_HEX_QUOT));
            }
            else
            {
                $sJsCode = (string)$this->xValue;
            }
            break;
        }
        return $sJsCode;
    }
192913
public function getHtml(): string
  {
    $this->prepareOverviewTable();

    if (!empty($this->templateData))
    {
      $this->setAttrData('slat-name', $this->submitName);

      // If required add template row to this louver control. This row will be used by JS for adding dynamically
      // additional rows to the louver control.
      $this->templateData[$this->templateKey] = 0;
      $row                                    = $this->rowFactory->createRow($this, $this->templateData);
      $row->addClass('slat_template');
      $row->setAttrStyle('visibility: collapse');
      $row->prepare($this->submitName);
    }

    $ret = $this->prefix;

    $ret .= Html::generateTag('table', $this->attributes);

    // Generate HTML code for the column classes.
    $ret .= '<colgroup>';
    $ret .= $this->rowFactory->getHtmlColumnGroup();
    $ret .= '</colgroup>';

    $ret .= Html::generateTag('thead', ['class' => OverviewTable::$class]);
    $ret .= $this->getHtmlHeader();
    $ret .= '</thead>';

    if ($this->footerControl)
    {
      $ret .= Html::generateTag('tfoot', ['class' => OverviewTable::$class]);
      $ret .= '<tr>';
      $ret .= Html::generateTag('td', ['colspan' => $this->rowFactory->getNumberOfColumns()]);
      $ret .= $this->footerControl->getHtml();
      $ret .= '</td>';
      $ret .= '<td class="error"></td>';
      $ret .= '</tr>';
      $ret .= '</tfoot>';
    }

    $ret .= Html::generateTag('tbody', ['class' => OverviewTable::$class]);
    $ret .= $this->getHtmlBody();
    $ret .= '</tbody>';

    $ret .= '</table>';

    $ret .= $this->postfix;

    $this->rowFactory->generateResponsiveCss($this->getAttribute('id'));

    return $ret;
  }