Builds the HTML used for the table header.
@param mixed $caption Caption [and subcaption] of the dump
@return string
330528
protected function makeTableHeader($caption)
    {
        if (is_array($caption)) {
            list($caption, $subcaption) = $caption;
        }

        $output = [];
        $output[] = '<tr>';
        $output[] = '<th colspan="3" colspan="100" style="'.$this->getHeaderCss().'">';
        $output[] = $caption;

        if (isset($subcaption)) {
            $output[] = '<div style="'.$this->getSubheaderCss().'">'.$subcaption.'</div>';
        }

        $output[] = '</td>';
        $output[] = '</tr>';
        return implode(PHP_EOL, $output);
    }
821510
public static function getBoxHeaderHTML($header)
    {
        $html = '';
        if (empty($header))
            return NULL;

        $html .= '<!-- Start_Box_Header -->';

        $html .= '<div class="box-header with-border">';
        $html .= '<h3 class="box-title">'.$header["title"].'</h3>';
        $html .= '<div class="box-tools pull-right">';
            $html .= '<button class="btn btn-box-tool" data-widget="collapse"><i class="fa fa-minus"></i></button>';
            $html .= '<button class="btn btn-box-tool" data-widget="remove"><i class="fa fa-times"></i></button>';
        $html .= '</div>';

        $html .= '<!-- End_Box_Header -->';

        return $html;
    }
710043
public function caption() : string
    {
        $template = $this->info()->captionTemplate;

        foreach ($this->info()->captionComponents as $variable) {
            $template = str_replace('$' . $variable->key, $variable->value, $template);
        }

        return $template;
    }
510053
public function renderStraight($container = null)
    {
        $this->parseContainer($container);
        if (null === $container) {
            $container = $this->getContainer();
        }

        if (! $active = $this->findActive($container)) {
            return '';
        }

        $active = $active['page'];
        $html = $this->htmlify($active);

        while ($parent = $active->getParent()) {
            if ($parent instanceof AbstractPage) {
                $html = $this->htmlify($parent, true).$html;
            }

            if ($parent === $container) {
                break;
            }

            $active = $parent;
        }

        return strlen($html) ? '<ol class="breadcrumb">'.$this->getIndent().$html.'</ol>' : '';
    }
1342457
protected function buildHeaders($headers) 
    {
        $string = '';
        foreach($headers as $key => $value) {
            if(empty($value)) continue;
            $string .= $key. ': '. $value. "\r\n";
        }
        return $string;
    }
904560
public static function TableHeading( $heading, $colspan = 3, $class = 'tabhead' )
	{
		$code = "";
		if( $heading )
		{
			$ins_class	= $class ? " class=\"".$class."\"" : "";
			$ins_colspan	= $colspan ? " colspan=\"".$colspan."\"" : "";
			$code = "  <tr><th".$ins_class.$ins_colspan.">".$heading."</th></tr>\n";
		}
		return $code;
	}
592488
public function toTable( $showNull = false)
	{
		$heading = "";
		$t = "<table class='filledframe' cellpadding=2 cellspacing=0>";
		$nodes = $this->getNodes();
		for( $j=0; $j<$this->getNodeSize(); $j++ )
		{
			$target = $nodes[$j];
			$heading .= "<th width=20>".$target->getNodeName()."</th>";
		}
		$t .= "<tr><th></th>".$heading."</tr>";
		for( $i=0; $i<$this->getNodeSize(); $i++ )
		{
			$source = $nodes[$i];
			$line = "";
			for( $j=0; $j<$this->getNodeSize(); $j++ )
			{

				$target = $nodes[$j];
				if( $this->isEdge( $source, $target ) )
					$value = $this->getEdgeValue( $source, $target );
				else if( $showNull )
					$value = 0;
				else
					$value = "";
				$line .= "<td align=center>".$value."</td>";
			}
			$t .= "<tr><th width=20>".$source->getNodeName()."</th>".$line."</tr>";
		}
		$t .= "</table>";
		return $t;
	}
1303006
protected function renderSlide($slideConfig = [])
    {
        $imageOptions = ArrayHelper::getValue($slideConfig, 'image', []);
        $imageSrc = ArrayHelper::remove($imageOptions, 'src', null);
        if (!$imageSrc) {
            return '';
        }

        $caption = $this->renderCaption(ArrayHelper::getValue($slideConfig, 'caption', false));
        $options = ArrayHelper::getValue($slideConfig, 'options', []);
        $options = ArrayHelper::merge($this->slideOptions, $options);

        $html[] = Html::beginTag('li', $options);
        $html[] = Html::img($imageSrc, $imageOptions);
        $html[] = $caption;
        $html[] = Html::endTag('li');
        return implode("\n", $html);
    }
1219140
public function table($options = 'caption:Example table|icon:state,icon|html:html')
	{
		function make($rows)
		{
			$keys   = array_shift($rows);
			$data   = array_map(function($values) use ($keys) {
				return array_combine($keys, $values);
			}, $rows);
			return $data;
		}

		$preview = make([
			['state','icon','value','text','html'],
			[true,'plane',1,'one','<strong>I am bold</strong>'],
			[false,'certificate',2,'two','<em>I am italic</em>'],
			[true,'bolt',3,'three','<code>true</code>'],
			[false,'wrench',4,'four','<a href="?options=index">Add an index</a>']
		]);

		$data = make([
			["option","description","example"],
			["index","Adds a numeric index column to the table","index"],
			["icon","Specifies which columns to output as icons","icon:state|icon:icon"],
			["html","Specifies which columns to output as HTML","html:html|html:text,html"],
			["keys","Specify which columns to build","keys:value,text|keys:value,icon,*"],
			["cols","Sets the width of individual columns","cols:50,100,150,150,400|cols:10%,60%,30%"],
			["type","Sets the table type ","type:text|type:data"],
			["pre","Preformats the entire table, or selected columns","pre|pre:html"],
			["caption","Adds a caption to the table","caption:Example table"],
			["id","Adds an id to the table","id:figures"],
			["class","Sets the table class attribute","class:fancy"],
			["style","Sets the table style attribute","style:transform:rotate(-5deg)"],
			["width","Sets the width of the table","width:700|width:100%"],
		]);

		foreach ($data as $index => $value)
		{
			$example = $data[$index]['example'];
			$data[$index]['example'] = implode(' ', array_map(function($value)
			{
				$options = str_replace('%', '%25', $value);
				return "<a href='?options=$options'><code>$value</code></a>";
			}, explode('|', $example)));
		}

		return view('sketchpad::help/helpers/table', compact('data', 'preview', 'options'));
	}
1163383
function box($text, $class, $caption='')
    {
        $result = "<div".(empty($class)?'':' class="'.$class.'"').">\n".(empty($caption)?'':
                '<span class="'.$class.'Caption">'.$caption.'</span><br />').$text."</div>\n";
        return $result;
    }
495827
public function caption($t = UNDEFINED)
    {
        if ($t === UNDEFINED && !$this->caption) {
            return ucwords(strtr(
                preg_replace('/_id$/', '', $this->short_name),
                '_',
                ' '
            ));
        }

        return $this->setterGetter('caption', $t);
    }
89418
public function header()
    {
        // If we have tab content
        if (isset($this->content_html{0})) {
            // Tab sub-headers html
            $sub_headers = '';

            // Iterate tab group tabs only if there is atleast two sub headers
            if (sizeof($this->tabs) > 2) {
                foreach ($this->tabs as $tab) {
                    // Don't render this tab as sub header
                    if ($tab == $this) continue;

                    // Render tab header as sub-header
                    $sub_headers .= m()->view($this->header_view)->tab($tab)->output();
                }
            }

            // Render just last tab
            $this->header_html .= m()
                ->view($this->header_view)
                ->sub_headers($sub_headers)
                ->class(isset($sub_headers{0}) ? 'sub-tabs-list' : '')
                ->tab($this)// Pass this tab object as main
                ->tab_id(end($this->tabs)->id)// Pass last tabs object id as identifier
                ->output();
        }

        return $this->header_html;
    }
1128752
public static function pageHeader($heading, $subtext, $htmlOptions = array())
    {
        self::addCssClass('page-header', $htmlOptions);
        $headerOptions = TbArray::popValue('headerOptions', $htmlOptions, array());
        $subtextOptions = TbArray::popValue('subtextOptions', $htmlOptions, array());
        $output = self::openTag('div', $htmlOptions);
        $output .= self::openTag('h1', $headerOptions);
        $output .= parent::encode($heading) . ' ' . self::tag('small', $subtextOptions, $subtext);
        $output .= '</h1>';
        $output .= '</div>';
        return $output;
    }
1250005
function toHTML()
    {

        return '<div class="captcha-container"><img src="' . $this->form_properties['assets_url'] . 'process.php?captcha=' . ($this->form_properties['captcha_storage'] == 'session' ? 2 : 1) . '&amp;nocache=' . time() . '" alt=""' . ($this->form_properties['doctype'] == 'xhtml' ? '/' : '') . '><a href="javascript:void(0)" title="' . $this->form_properties['language']['new_captcha'] . '">' . $this->form_properties['language']['new_captcha'] . '</a></div>';
    
    }
124227
public function format($html = false) {
        $format  = '%s: %s';

        if ($this->lastLine > 0) {
            $format .= PHP_EOL;
            $format .= 'From line %d, column %d; ' ;
            $format .= 'to line %d, column %d';
        }

        $message = sprintf(
            $format,
            $html ? '<strong>' . $this->type . '</strong>' : $this->type,
            $html ? htmlentities($this->text, ENT_COMPAT, 'UTF-8') : $this->text,
            $this->firstLine,
            $this->firstColumn,
            $this->lastLine,
            $this->lastColumn
        );

        if (!$html) {
            return $message . PHP_EOL . $this->extract;
        }

        // Check if the user has specified a custom highlighter
        if ($this->highlighter) {
            $highlighter = $this->highlighter;
            $extract = $highlighter($this->extract, $this->hiliteStart, $this->hiliteLength);
        } else {
            $extract = $this->highlight($this->extract, $this->hiliteStart, $this->hiliteLength);
        }

        $message .= PHP_EOL . $extract;
        return nl2br($message, false);
    }
643443
public function renderTable() : string
    {
        if ($this->table->isEmpty()) throw new BuilderException('Cannot render empty table');

        $visibleColumns = $this->table->getVisibleColumns();

        // border for header and footer
        $borderParts = array_map(function ($columnName) {
            $width = $this->table->getColumnWidth($columnName);
            return str_repeat(self::CHAR_LINE_SEPARATOR, ($width + 2));
        }, $visibleColumns->toArray());

        $border = self::CHAR_CORNER_SEPARATOR
                . join(self::CHAR_CORNER_SEPARATOR, $borderParts)
                . self::CHAR_CORNER_SEPARATOR;

        $headerCells = array_map(function ($columnName) {
            return new Cell($columnName, $columnName);
        }, $visibleColumns->toArray());

        $headerRow = new Row();
        $headerRow->addCells(...$headerCells);
        $header = $this->renderRow($headerRow, $visibleColumns);

        $body = '';
        $rows = $this->table->getRows();
        $visibleColumns = $this->table->getVisibleColumns();
        foreach ($rows as $row) {
            $currentLine = $this->renderRow($row, $visibleColumns);
            $body .= $currentLine . PHP_EOL;
        }

        $tableAsString = $border . PHP_EOL . $header . PHP_EOL . $border . PHP_EOL . $body . $border;
        return $tableAsString;
    }
464758
private function render() : string
    {
        $html = '<div class="jumbotron">' .
            (($this->fluid === true) ? '<div class="container">' : null) .
            '<h1>' . $this->view->escapeHtml($this->heading) .
            (($this->sub_heading !== null) ? '<small>' .
            $this->view->escapeHtml($this->sub_heading) . '</small>' : null) .
            '</h1>' . $this->content .
            (($this->fluid === true) ? '</div>' : null) .
            '</div>';

        return $html;
    }