Render the HTML table

@return  string The rendered HTML table

@since   2.1
18438
public function toString()
    {
        $output = [];
        $output[] = '<table' . $this->renderAttributes($this->getTableAttributes()) . '>';

        if (count($this->specialRows['header'])) {
            $output[] = $this->renderArea($this->specialRows['header'], 'thead', 'th');
        }

        $ids = array_diff(
            array_keys($this->rows),
            array_merge($this->specialRows['header'], $this->specialRows['footer'])
        );

        if (count($ids)) {
            $output[] = $this->renderArea($ids);
        }

        if (count($this->specialRows['footer'])) {
            $output[] = $this->renderArea($this->specialRows['footer'], 'tfoot');
        }

        $output[] = '</table>';

        return implode('', $output);
    }
1258026
public function render()
    {
        $columns = $this->getColumns();

        $results = '';

        foreach ($columns as $column) {
            $results .= $this->getStub($column->getType()->getName(), $column->getName());
        }

        return $results;
    }
225349
public function render() {
		$rows = [];
		
		$rows[] = $this->color('ZExt framework ' . Version::getVersion(), 'yellow') . ' | Debug info:' . PHP_EOL;

		$brief = array_search('brief', $this->getCliParams());
		
		foreach ($this->info as $info) {
			$row = ' ' . $info->getName();
			
			if ($info->hasTitle()) {
				$row .= ': ' . $this->bbCodesHandle($info->getTitle());
			}
			
			$rows[] = $this->colorLine($row, null, 'dark_gray') . PHP_EOL;
			
			if ($brief || $info->isEmpty()) {
				continue;
			}
			
			$rows[] = $this->createContent($info) . PHP_EOL;
		}
		
		return implode(PHP_EOL, $rows) . PHP_EOL;
	}
1064832
public function render()
    {
        if (!$this->grid->allowExport()) {
            return '';
        }

        $this->setUpScripts();

        $export = trans('admin.export');
        $all = trans('admin.all');
        $currentPage = trans('admin.current_page');
        $selectedRows = trans('admin.selected_rows');

        $page = request('page', 1);

        return <<<EOT

<div class="btn-group pull-right" style="margin-right: 10px">
    <a class="btn btn-sm btn-twitter"><i class="fa fa-download"></i> {$export}</a>
    <button type="button" class="btn btn-sm btn-twitter dropdown-toggle" data-toggle="dropdown">
        <span class="caret"></span>
        <span class="sr-only">Toggle Dropdown</span>
    </button>
    <ul class="dropdown-menu" role="menu">
        <li><a href="{$this->grid->exportUrl('all')}" target="_blank">{$all}</a></li>
        <li><a href="{$this->grid->exportUrl('page', $page)}" target="_blank">{$currentPage}</a></li>
        <li><a href="{$this->grid->exportUrl('selected', '__rows__')}" target="_blank" class='export-selected'>{$selectedRows}</a></li>
    </ul>
</div>
&nbsp;&nbsp;

EOT;
    }
351704
public function render_table()
    {
        $ret = array();
        if (!is_array($this->args['table'])) {
            return;
        }
        foreach ($this->args['table'] as $row) {
            list($table, $alias) = $row;

            if (is_string($table)) {
                // table name passed as string
                $table = $this->bt($table);

            } elseif ($table instanceof DB_dsql) {
                // table passed as DSQL expression

                // remove SQL_CALC_FOUND_ROWS from subquery
                $i = @array_search('SQL_CALC_FOUND_ROWS', $table->args['options']);
                if ($i !== false) {
                    unset($table->args['options'][$i]);
                }

                // consume subquery
                $table = $this->consume($table);
            }

            if ($alias !== UNDEFINED && $alias) {
                $table .= ' '.$this->bt($alias);
            }

            $ret[] = $table;
        }

        return implode(',', $ret);
    }
515873
public function render()
    {
        $changes = parent::render();
        $html = '';
        if (empty($changes)) {
            return $html;
        }

        $html .= '<table class="Differences DifferencesInline">';
        $html .= '<thead>';
        $html .= '<tr>';
        $html .= '<th>Old</th>';
        $html .= '<th>New</th>';
        $html .= '<th>Differences</th>';
        $html .= '</tr>';
        $html .= '</thead>';
        foreach ($changes as $i => $blocks) {
            // If this is a separate block, we're condensing code so output ...,
            // indicating a significant portion of the code has been collapsed as
            // it is the same
            if ($i > 0) {
                $html .= '<tbody class="Skipped">';
                $html .= '<th>&hellip;</th>';
                $html .= '<th>&hellip;</th>';
                $html .= '<td>&nbsp;</td>';
                $html .= '</tbody>';
            }

            foreach ($blocks as $change) {
                $html .= '<tbody class="Change' . ucfirst($change['tag']) . '">';
                // Equal changes should be shown on both sides of the diff
                if ($change['tag'] == 'equal') {
                    foreach ($change['base']['lines'] as $no => $line) {
                        $fromLine = $change['base']['offset'] + $no + 1;
                        $toLine = $change['changed']['offset'] + $no + 1;
                        $html .= '<tr>';
                        $html .= '<th>' . $fromLine . '</th>';
                        $html .= '<th>' . $toLine . '</th>';
                        $html .= '<td class="Left">' . $line . '</td>';
                        $html .= '</tr>';
                    }
                } // Added lines only on the right side
                else {
                    if ($change['tag'] == 'insert') {
                        foreach ($change['changed']['lines'] as $no => $line) {
                            $toLine = $change['changed']['offset'] + $no + 1;
                            $html .= '<tr>';
                            $html .= '<th>&nbsp;</th>';
                            $html .= '<th>' . $toLine . '</th>';
                            $html .= '<td class="Right"><ins>' . $line . '</ins>&nbsp;</td>';
                            $html .= '</tr>';
                        }
                    } // Show deleted lines only on the left side
                    else {
                        if ($change['tag'] == 'delete') {
                            foreach ($change['base']['lines'] as $no => $line) {
                                $fromLine = $change['base']['offset'] + $no + 1;
                                $html .= '<tr>';
                                $html .= '<th>' . $fromLine . '</th>';
                                $html .= '<th>&nbsp;</th>';
                                $html .= '<td class="Left"><del>' . $line . '</del>&nbsp;</td>';
                                $html .= '</tr>';
                            }
                        } // Show modified lines on both sides
                        else {
                            if ($change['tag'] == 'replace') {
                                foreach ($change['base']['lines'] as $no => $line) {
                                    $fromLine = $change['base']['offset'] + $no + 1;
                                    $html .= '<tr>';
                                    $html .= '<th>' . $fromLine . '</th>';
                                    $html .= '<th>&nbsp;</th>';
                                    $html .= '<td class="Left"><span>' . $line . '</span></td>';
                                    $html .= '</tr>';
                                }

                                foreach ($change['changed']['lines'] as $no => $line) {
                                    $toLine = $change['changed']['offset'] + $no + 1;
                                    $html .= '<tr>';
                                    $html .= '<th>' . $toLine . '</th>';
                                    $html .= '<th>&nbsp;</th>';
                                    $html .= '<td class="Right"><span>' . $line . '</span></td>';
                                    $html .= '</tr>';
                                }
                            }
                        }
                    }
                }
                $html .= '</tbody>';
            }
        }
        $html .= '</table>';
        return $html;
    }
682458
public function renderAsTable() {
    $html = '';
    foreach ($this->cells as $iRow => $rowCells) {
      $rowHtml = '';
      foreach ($rowCells as $iCol => $cell) {
        $rowHtml .= $cell->render();
      }
      $html .= '    <tr>' . $rowHtml . '</tr>' . "\n";
    }
    return "<table>\n  <tbody>\n" . $html . "  </tbody>\n</table>\n";
  }
534077
public function render() {

		if($this->loadTemplate())	{

			$this
				->primeTemplate()
				->insertFormFields()
				->insertErrorMessages()
				->insertFormStart()
				->insertFormEnd()
				->cleanupHtml()
			;

			return $this->html;

		}

	}
819077
public function renderTableFooter()
    {
        $cells = [];
        foreach ($this->columns as $column) {
            /* @var $column TreeColumn */
            $cells[] = $column->renderFooterCell();
        }
        $content = Html::tag('tr', implode('', $cells), $this->footerRowOptions);
        return "<tfoot>\n" . $content . "\n</tfoot>";
    }
1078443
public static function render() {
        self::newRow();
        ob_start();
        ?>

        <table <?php echo (!empty(self::$table_attributes)) ? self::parseAttributes(self::$table_attributes) : ""; ?>>
            <?php
            if (!empty(self::$headers)) {
                ?>

                <thead>
                    <tr>
                        <?php
                        foreach (self::$headers as $header) {
                            ?>

                            <th <?php echo self::parseAttributes($header[1]); ?>><?php echo $header[0] ?></th>
                            <?php
                        }
                        ?>

                    </tr>
                </thead>
                <?php
            }
            if (!empty(self::$rows)) {
                ?>

                <tbody>
                    <?php
                    foreach (self::$rows as $rowData) {
                        if (count($rowData) > 1) {
                            ?>

                            <tr <?php echo self::parseAttributes($rowData[0]); ?>>
                                <?php
                                foreach ($rowData[1] as $row) {
                                    ?>
                                    <td <?php echo self::parseAttributes($row[1]); ?>><?php echo $row[0] ?></td>
                                    <?php
                                }
                                ?>

                            </tr>
                            <?php
                        }
                    }
                    ?>

                </tbody>
                <?php
            }
            if (!empty(self::$footers)) {
                ?>

                <tfoot>
                    <tr>
                        <?php
                        foreach (self::$footers as $footer) {
                            ?>

                            <th <?php echo self::parseAttributes($footer[1]); ?>><?php echo $footer[0] ?></th>
                            <?php
                        }
                        ?>

                    </tr>
                </tfoot>
            <?php }
            ?>
        </table>
        <?php
        return ob_get_clean();
    }
1060868
protected function render()
    {
        if (!isset($this->items[0])) {
            return '';
        }
        foreach ($this->items as $itemId => $item) {
            $item->setCollapsable(
                self::$id, 
                self::$id . $itemId, 
                in_array($itemId, $this->openedItems));
        }
        $this->setAttribute('id', self::$id);
        $this->addCssClass($this->itemType . '-group');
        return $this
            ->html('<div' . $this->getEltDecorationStr() . '>')
            ->html(implode("\n", $this->items))
            ->html('</div>')
            ->getHtml();
    }
373237
public function render(): string
    {
        $this->checkRoutesValidity($this->getAttribute('routes'));
        $this->checkIfAtLeastOneColumnIsDeclared();
        $this->checkDestroyAttributesDefinition();
        $this->handleRequest();
        $this->generateEntitiesListFromQuery();

        return view('tablelist::table', ['table' => $this]);
    }
848155
public function render()
    {
        foreach ($this->buttons as $button) {
            $this->getElement()->appendContent($this->renderButton($button));
        }

        return $this->getElement()->render();
    }
555834
public function render()
    {
        $data = $this->createData();
        $table = $this->createTable($data, $this->options[self::LISTVIEW_PARAM_TABLE_CLASS]);
        return $table->render();
    }
1353306
public function render() {
        $string = '';
        foreach (static::$_scripts as $script) {
            $method = '_render' . ucfirst($script['type']);
            $string .= $this->{$method}($script['value'], $script['attrs']);
        }
        return $string;
    }
851000
public function render()
    {
        
        // Render the table container
        $output = "<table {$this->renderAttributes()} >\n\t<tbody>\n";
        
        // Render the heading
        $output .= "\t\t<th>\n";
        
        foreach ($this->_head as $heading) {
            
            $output .= "\t\t\t<td>{$heading}</td>\n";
            
        }
        
        $output .= "\t\t</th>\n";
        
        // Render the rows
        foreach($this->_rows as $row) {
            
            $output .= "\t\t<tr>\n";
            
            foreach($this->_head as $columnName) {
                
                $column = $row[$columnName];
                
                switch(gettype($column)) {
                    
                    case 'array':
                        $column = print_r($column, true);
                        break;
                    
                    case 'object':
                        $column = (method_exists($column, 'render')) ? $column->render() : 'Object';
                        break;
                    
                    case 'boolean':
                        $column = $column ? 'True' : 'False';
                        break;
                    
                    case 'unknown type':
                    case 'resource':
                    case 'NULL':
                        $column = 'NULL';
                    
                    default:
                        break;
                    
                }
                
                $output .= "\t\t\t<td>{$column}</td>\n";
                
            }
            
            $output .= "\t\t</tr>\n";
            
        }
        
        $output .= "\t</tbody>\n</table>";
        
        return $output;
        
    }
1162830
public function render()
	{
		$html = array();

		// Start toolbar div.
		$html[] = '<div class="toolbar-list" id="' . $this->_name . '">';
		$html[] = '<ul>';

		foreach ($this->_bar as $key => $button)
		{
			$this->_bar[$key][9] = array();
			if ($button[0] == 'Separator')
			{
				continue;
			}
			if (!isset($this->_bar[$key - 1]) || $this->_bar[$key - 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'first';
			}
			if (!isset($this->_bar[$key + 1]) || $this->_bar[$key + 1][0] == 'Separator')
			{
				$this->_bar[$key][9][] = 'last';
			}
		}

		// Render each button in the toolbar.
		foreach ($this->_bar as $button)
		{
			$html[] = $this->renderButton($button);
		}

		// End toolbar div.
		$html[] = '</ul>';
		$html[] = '</div>';

		return implode("\n", $html);
	}