Moodle PHP Documentation 4.5
Moodle 4.5dev (Build: 20240606) (d3ae1391abe)
HTMLPurifier_ChildDef Class Reference
Inheritance diagram for HTMLPurifier_ChildDef:
HTMLPurifier_ChildDef_Chameleon HTMLPurifier_ChildDef_Custom HTMLPurifier_ChildDef_Empty HTMLPurifier_ChildDef_List HTMLPurifier_ChildDef_Required HTMLPurifier_ChildDef_Table HTMLPurifier_ChildDef_Optional HTMLPurifier_ChildDef_StrictBlockquote

Public Member Functions

 getAllowedElements ($config)
 Get lookup of tag names that should not close this element automatically.
 
 validateChildren ($children, $config, $context)
 Validates nodes according to definition and returns modification.
 

Public Attributes

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

Member Function Documentation

◆ getAllowedElements()

HTMLPurifier_ChildDef::getAllowedElements ( $config)

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

All other elements will do so.

Parameters
HTMLPurifier_Config$configHTMLPurifier_Config object
Return values
array

Reimplemented in HTMLPurifier_ChildDef_StrictBlockquote.

◆ validateChildren()

HTMLPurifier_ChildDef::validateChildren ( $children,
$config,
$context )
abstract

Validates nodes according to definition and returns modification.

Parameters
HTMLPurifier_Node[]$childrenArray of HTMLPurifier_Node
HTMLPurifier_Config$configHTMLPurifier_Config object
HTMLPurifier_Context$contextHTMLPurifier_Context object
Return values
bool|arraytrue to leave nodes as is, false to remove parent node, array of replacement children

Reimplemented in HTMLPurifier_ChildDef_Chameleon, HTMLPurifier_ChildDef_Custom, HTMLPurifier_ChildDef_Empty, HTMLPurifier_ChildDef_List, HTMLPurifier_ChildDef_Optional, HTMLPurifier_ChildDef_Required, HTMLPurifier_ChildDef_StrictBlockquote, and HTMLPurifier_ChildDef_Table.

Member Data Documentation

◆ $allow_empty

HTMLPurifier_ChildDef::$allow_empty

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

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

◆ $elements

HTMLPurifier_ChildDef::$elements = array()

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

@type array

◆ $type

HTMLPurifier_ChildDef::$type

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

Used occasionally in terms of context. @type string


The documentation for this class was generated from the following file: