HumHub Documentation (unofficial)

ListTrait

Adds the list blocks

Table of Contents

Properties

$keepListStartNumber  : bool

Methods

consumeOl()  : mixed
Consume lines for an ordered list
consumeUl()  : mixed
Consume lines for an unordered list
detectLineType()  : mixed
identifyOl()  : mixed
identify a line as the beginning of an ordered list.
identifyUl()  : mixed
identify a line as the beginning of an unordered list.
parseBlocks()  : mixed
parseInline()  : mixed
renderAbsy()  : mixed
renderList()  : mixed
Renders a list
consumeList()  : mixed
generateHtmlAttributes()  : string
Return html attributes string from [attrName => attrValue] list

Properties

$keepListStartNumber

public bool $keepListStartNumber = false

enable support start attribute of ordered lists. This means that lists will start with the number you actually type in markdown and not the HTML generated one. Defaults to false which means that numeration of all ordered lists(

    ) starts with 1.

Methods

consumeOl()

Consume lines for an ordered list

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

consumeUl()

Consume lines for an unordered list

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

detectLineType()

protected abstract detectLineType(mixed $lines, mixed $current) : mixed
Parameters
$lines : mixed
$current : mixed

identifyOl()

identify a line as the beginning of an ordered list.

protected identifyOl(mixed $line) : mixed
Parameters
$line : mixed

identifyUl()

identify a line as the beginning of an unordered list.

protected identifyUl(mixed $line) : mixed
Parameters
$line : mixed

parseBlocks()

protected abstract parseBlocks(mixed $lines) : mixed
Parameters
$lines : mixed

parseInline()

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

renderAbsy()

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

renderList()

Renders a list

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

consumeList()

private consumeList(mixed $lines, mixed $current, mixed $block, mixed $type) : mixed
Parameters
$lines : mixed
$current : mixed
$block : mixed
$type : mixed

generateHtmlAttributes()

Return html attributes string from [attrName => attrValue] list

private generateHtmlAttributes(array<string|int, mixed> $attributes) : string
Parameters
$attributes : array<string|int, mixed>

the attribute name-value pairs.

Return values
string

        
On this page

Search results