HTMLPurifier_HTMLModule::addElement
Convenience function that sets up a new element
Signature
public function addElement(Name
$element,
What
$type,
Allowed
$contents,
[array
$attr_includes = ,
[array
$attr = ]] )
Parameters
$element
—
object
- of element to add
$type
—
object
- content set should element be registered to?
Set as false to skip this step.
$contents
—
object
- children in form of:
"$content_model_type: $content_model"
$attr_includes
—
array
- attribute collections to register to
element?
$attr
—
array
- unique attributes does the element define?
Returns
- Created
- element definition object, so you
can set advanced parameters