HumHub Documentation (unofficial)

TableTrait

Adds the table blocks

Table of Contents

Methods

composeTable()  : string
This method composes a table from parsed body and head HTML.
consumeTable()  : mixed
Consume lines for a table
identifyTable()  : mixed
identify a line as the beginning of a table block.
parseInline()  : mixed
parseTd()  : mixed
renderAbsy()  : mixed
renderTable()  : mixed
render a table block

Methods

composeTable()

This method composes a table from parsed body and head HTML.

protected composeTable(string $head, string $body) : string

You may override this method to customize the table rendering, for example by adding a class to the table tag:

return "<table class="table table-striped">\n<thead>\n$head</thead>\n<tbody>\n$body</tbody>\n</table>\n"
Parameters
$head : string

table head HTML.

$body : string

table body HTML.

Tags
since
1.2.0
Return values
string

the complete table HTML.

consumeTable()

Consume lines for a table

protected consumeTable(mixed $lines, mixed $current) : mixed
Parameters
$lines : mixed
$current : mixed

identifyTable()

identify a line as the beginning of a table block.

protected identifyTable(mixed $line, mixed $lines, mixed $current) : mixed
Parameters
$line : mixed
$lines : mixed
$current : mixed

parseInline()

protected abstract parseInline(mixed $text) : mixed
Parameters
$text : mixed

parseTd()

protected parseTd(mixed $markdown) : mixed
Parameters
$markdown : mixed
Tags
marker

|

renderAbsy()

protected abstract renderAbsy(mixed $absy) : mixed
Parameters
$absy : mixed

renderTable()

render a table block

protected renderTable(mixed $block) : mixed
Parameters
$block : mixed

        
On this page

Search results