Returns the inner HTML code of the header for this table.

@return string
547074
protected function getHtmlHeader(): string
  {
    $ret = '';

    if ($this->title)
    {
      $mode    = 1;
      $colspan = 0;

      $ret .= '<tr class="title">';
      foreach ($this->columns as $column)
      {
        $empty = $column->hasEmptyHeader();

        if ($mode==1)
        {
          if ($empty)
          {
            $ret .= '<th class="empty"></th>';
          }
          else
          {
            $mode = 2;
          }
        }

        if ($mode==2)
        {
          if ($empty)
          {
            $mode = 3;
          }
          else
          {
            $colspan++;
          }
        }

        if ($mode==3)
        {
          if ($colspan==1) $colspan = null;
          $ret  .= Html::generateElement('th', ['colspan' => $colspan], $this->title);
          $mode = 4;
        }

        if ($mode==4)
        {
          $ret .= '<th class="empty"></th>';
        }
      }

      if ($mode==2)
      {
        if ($colspan==1) $colspan = null;
        $ret .= Html::generateElement('th', ['colspan' => $colspan], $this->title);
      }

      $ret .= '</tr>';
    }

    $ret .= Html::generateTag('tr', ['class' => [self::$class, 'header']]);
    foreach ($this->columns as $column)
    {
      $ret .= $column->getHtmlColumnHeader();
    }
    $ret .= '</tr>';

    if ($this->filter)
    {
      $ret .= Html::generateTag('tr', ['class' => [self::$class, 'filter']]);
      foreach ($this->columns as $column)
      {
        $ret .= $column->getHtmlColumnFilter();
      }
      $ret .= '</tr>';
    }

    return $ret;
  }
194632
public function getHtmlHeadEntrySet()
    {
        $set = parent::getHtmlHeadEntrySet();

        if ($this->input_cell !== null) {
            $set->addEntrySet($this->input_cell->getHtmlHeadEntrySet());
        }

        return $set;
    }
935448
public function getHtml() : string
    {
        $head = (new HeadGenerator($this))->render();
        $body = (new BodyGenerator($this))->render();
        return "<!doctype html><html>$head$body</html>";
    }
386521
public function getHtml(): string
  {
    $ret = $this->prefix;
    $ret .= Html::generateElement('a', $this->attributes, $this->innerHtml, true);
    $ret .= $this->postfix;

    return $ret;
  }
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;
    }
530350
public function getHeaderRowHTML()
    {
        $output = [];
        foreach ($this->columns as $name => $column) {

            // If multiple formatters are defined, use the first for the header cell
            if (is_array($column)) {
                $column = $column[0];
            }

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

                $output[] = $column->getHeaderCellHTML($field);
            } else {
                $output[] = $column->getHeaderCellHTML();
            }
        }

        return implode('', $output);
    }
640111
public function renderHeader()
    {
        $cells = [];
        foreach ($this->columns as $column) {
            /* @var $column BaseColumn */
            $cells[] = $this->renderHeaderCell($column);
        }

        if ($this->max === null || ($this->max >= 1 && $this->max !== $this->min)) {
            $button = $this->isAddButtonPositionHeader() ? $this->renderAddButton() : '';

            if ($this->cloneButton) {
                $cells[] = $this->renderButtonHeaderCell();
            }

            $cells[] = $this->renderButtonHeaderCell($button);
        }

        return Html::tag('thead', Html::tag('tr', implode("\n", $cells)));
    }
872257
public function getHtmlId()
    {
        $id = '';
        if (is_object($this->parent)) {
            $id = $this->parent->getHtmlId();
        }
        
        if ($this->key !== '') {
            $id .= '-' . $this->key;
        }
        
        return $id;
    }
887165
public function buildCode()
    {
        $res = '';
        foreach ($this->styles as $href => $val) {
            $res .= '<link href="' . $href . '" rel="stylesheet" type="text/css" />' . "\r\n";
        }

        return $res;
    }
1204375
private function footer()
    {
        $footer = $this->footer_content;
        if ($footer) {
            if ($this->header_type == self::OPT_HEADER_PRE) {
                $footer = str_replace("\n", '', $footer);;
            }
            $footer = $this->replace_keywords($footer);

            if ($this->use_classes) {
                $attr = ' class="foot"';
            }
            else {
                $attr = " style=\"{$this->footer_content_style}\"";
            }
            if ($this->header_type == self::OPT_HEADER_PRE_TABLE && $this->line_numbers != self::OPT_LINE_NUMBERS_NONE) {
                $footer = "<tfoot><tr><td colspan=\"2\">$footer</td></tr></tfoot>";
            }
            else {
                $footer = "<div$attr>$footer</div>";
            }
        }

        if (self::OPT_HEADER_NONE == $this->header_type) {
            return ($this->line_numbers != self::OPT_LINE_NUMBERS_NONE) ? '</ol>' . $footer : $footer;
        }

        if ($this->header_type == self::OPT_HEADER_DIV || $this->header_type == self::OPT_HEADER_PRE_VALID) {
            if ($this->line_numbers != self::OPT_LINE_NUMBERS_NONE) {
                return "</ol>$footer</div>";
            }

            return ($this->force_code_block ? '</div>' : '') .
                   "$footer</div>";
        }
        elseif ($this->header_type == self::OPT_HEADER_PRE_TABLE) {
            if ($this->line_numbers != self::OPT_LINE_NUMBERS_NONE) {
                return "</tr></tbody>$footer</table>";
            }

            return ($this->force_code_block ? '</div>' : '') .
                   "$footer</div>";
        }
        else {
            if ($this->line_numbers != self::OPT_LINE_NUMBERS_NONE) {
                return "</ol>$footer</pre>";
            }

            return ($this->force_code_block ? '</div>' : '') .
                   "$footer</pre>";
        }
    }
168327
public function getInnerHtml()
    {
        $html = '';
        if ($content_node = $this->getFirstElmNode()) {
            $document = $content_node->ownerDocument;

            foreach ($content_node->childNodes as $node) {
                if ($this->xml_mode) {
                    $html .= $document->saveXML($node);
                } else {
                    $html .= $document->saveHTML($node);
                }
            }

            $html = $this->handleHtmlResult($html);
        }

        return $html;
    }
43347
public function innerHtml()
    {
        if ( ! $this->hasChildren()) {
            // no children
            return '';
        }

        if ( ! is_null($this->innerHtml)) {
            // we already know the result.
            return $this->innerHtml;
        }

        $child  = $this->firstChild();
        $string = '';

        // continue to loop until we are out of children
        while ( ! is_null($child)) {
            if ($child instanceof TextNode) {
                $string .= $child->text();
            } elseif ($child instanceof HtmlNode) {
                $string .= $child->outerHtml();
            } else {
                throw new UnknownChildTypeException('Unknown child type "'.get_class($child).'" found in node');
            }

            try {
                $child = $this->nextChild($child->id());
            } catch (ChildNotFoundException $e) {
                // no more children
                $child = null;
            }
        }

        // remember the results
        $this->innerHtml = $string;

        return $string;
    }
1358534
protected function renderHeader()
    {
        $tools = $this->renderTools();
        if ($this->header !== null) {
            $header = Html::tag('h5', "\n" . $this->header . "\n", $this->headerOptions) . "\n" . ($tools !== null ? $tools : '');
            return Html::tag('div', $header, ['class' => 'ibox-title']);
        } else {
            return null;
        }
    }
1326048
public function getHtmlColumnHeader(): string
  {
    $attributes = [];
    $classes    = [];

    // Add class indicating this column can be used for sorting.
    if ($this->sortable)
    {
      $classes[] = 'sort-1';

      // Add attributes indicating the sort order of this column and direction.
      if ($this->sortOrder!==null)
      {
        $attributes['data-sort-order-1'] = $this->sortOrder;

        $classes[] = ($this->sortDirection=='desc') ? 'sorted-1-desc' : 'sorted-1-asc';
      }
    }

    // Add class indicating this column can be used for sorting.
    if ($this->sortable2)
    {
      $classes[] = 'sort-2';

      // Add attributes indicating the sort order of this column and direction.
      if ($this->sortOrder2!==null)
      {
        $attributes['data-sort-order-2'] = $this->sortOrder2;

        $classes[] = ($this->sortDirection2=='desc') ? 'sorted-2-desc' : 'sorted-2-asc';
      }
    }

    $attributes['class']   = implode(' ', $classes);
    $attributes['colspan'] = 2;

    return Html::generateElement('th', $attributes, '<span>&nbsp;</span>'.Html::txt2Html($this->headerText), true);
  }
715466
public function getHeaderHtmlOptions()
    {
        $r = '';
        if ($this->htmlClass) {
            $this->headerHtmlOptions['class'] = (isset($this->headerHtmlOptions['class']) ? $this->headerHtmlOptions['class'] . ' ' : '') . $this->htmlClass;
        }
        foreach ($this->headerHtmlOptions as $k => $v)
            $r .= "$k = '$v' ";
        return $r;
    }
531522
public function getHtmlHeadEntrySet()
    {
        $set = parent::getHtmlHeadEntrySet();

        foreach ($this->columns as $column) {
            $set->addEntrySet($column->getHtmlHeadEntrySet());
        }

        foreach ($this->spanning_columns as $column) {
            $set->addEntrySet($column->getHtmlHeadEntrySet());
        }

        foreach ($this->extra_rows as $row) {
            $set->addEntrySet($row->getHtmlHeadEntrySet());
        }

        foreach ($this->groups as $group) {
            $set->addEntrySet($group->getHtmlHeadEntrySet());
        }

        return $set;
    }
1341946
public function renderHead()
    {
        $headers = $this->getTable()->getHeaders();
        $render = '';
        foreach ($headers as $name => $title) {
            $render .= $this->getTable()->getHeader($name)->render();
        }
        $render = sprintf('<tr class="zf-title">%s</tr>', $render);
        return $render;
    }