HumHub Documentation (unofficial)

HTMLPurifier_ChildDef_Required extends HTMLPurifier_ChildDef
in package

Definition that allows a set of elements, but disallows empty children.

Table of Contents

Properties

$allow_empty  : mixed
Indicates whether or not an empty array of children is okay.
$elements  : mixed
Lookup table of allowed elements.
$type  : mixed
Type of child definition, usually right-most part of class name lowercase.
$whitespace  : mixed
Whether or not the last passed node was all whitespace.

Methods

__construct()  : mixed
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 = \false
Tags
type

bool

$elements

Lookup table of allowed elements.

public mixed $elements = array()
Tags
type

array

$type

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

public mixed $type = 'required'
Tags
type

string

$whitespace

Whether or not the last passed node was all whitespace.

protected mixed $whitespace = \false
Tags
type

bool

Methods

__construct()

public __construct(array<string|int, mixed>|string $elements) : mixed
Parameters
$elements : array<string|int, mixed>|string

List of allowed element names (lowercase).

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