ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f87
HTMLPurifier_ChildDef Class Reference

Defines allowed child nodes and validates nodes against it. More...

+ Inheritance diagram for HTMLPurifier_ChildDef:
+ Collaboration diagram for HTMLPurifier_ChildDef:

Public Member Functions

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

Data Fields

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

Detailed Description

Defines allowed child nodes and validates nodes against it.

Definition at line 6 of file ChildDef.php.

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
Returns
array

Definition at line 36 of file ChildDef.php.

References $elements, and validateChildren().

37  {
38  return $this->elements;
39  }
$elements
Lookup array of all elements that this definition could possibly allow.
Definition: ChildDef.php:28
+ Here is the call graph for this function:

◆ validateChildren()

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

Validates nodes according to definition and returns modification.

Parameters
HTMLPurifier_Node[]$children Array of HTMLPurifier_Node
HTMLPurifier_Config$configHTMLPurifier_Config object
HTMLPurifier_Context$contextHTMLPurifier_Context object
Returns
bool|array true to leave nodes as is, false to remove parent node, array of replacement children

Referenced by getAllowedElements().

+ Here is the caller graph for this function:

Field 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. bool

Definition at line 22 of file ChildDef.php.

◆ $elements

HTMLPurifier_ChildDef::$elements = array()

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

array

Definition at line 28 of file ChildDef.php.

Referenced by getAllowedElements().

◆ $type

HTMLPurifier_ChildDef::$type

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

Used occasionally in terms of context. string

Definition at line 13 of file ChildDef.php.


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