HumHub Documentation (unofficial)

HTMLPurifier_ChildDef_List extends HTMLPurifier_ChildDef
in package

Definition for list containers ul and ol.

What does this do? The big thing is to handle ol/ul at the top level of list nodes, which should be handled specially by /folding/ them into the previous list node. We generally shouldn't ever see other disallowed elements, because the autoclose behavior in MakeWellFormed handles it.

Table of Contents

Properties

$allow_empty  : mixed
Indicates whether or not an empty array of children is okay.
$elements  : mixed
Lookup array of all elements that this definition could possibly allow.
$type  : mixed
Type of child definition, usually right-most part of class name lowercase.
$whitespace  : mixed

Methods

getAllowedElements()  : array<string|int, mixed>
Get lookup of tag names that should not close this element automatically.
validateChildren()  : array<string|int, mixed>
Validates nodes according to definition and returns modification.

Properties

$allow_empty

Indicates whether or not an empty array of children is okay.

public mixed $allow_empty

This is necessary for redundant checking when changes affecting a child node may cause a parent node to now be disallowed.

Tags
type

bool

$elements

Lookup array of all elements that this definition could possibly allow.

public mixed $elements = array('li' => \true, 'ul' => \true, 'ol' => \true)
Tags
type

array

$type

Type of child definition, usually right-most part of class name lowercase.

public mixed $type = 'list'
Tags
type

string

$whitespace

public mixed $whitespace

Methods

getAllowedElements()

Get lookup of tag names that should not close this element automatically.

public getAllowedElements(HTMLPurifier_Config $config) : array<string|int, mixed>

All other elements will do so.

Parameters
$config : HTMLPurifier_Config

HTMLPurifier_Config object

Return values
array<string|int, mixed>

        
On this page

Search results