extends |
HTMLPurifier_ChildDef |
---|
Definition that uses different definitions depending on context.
The del and ins tags are notable because they allow different types of elements depending on whether or not they're in a block or inline context. Chameleon allows this behavior to happen by using two different definitions depending on context. While this somewhat generalized, it is specifically intended for those two tags.
Methods | ||||||||
---|---|---|---|---|---|---|---|---|
public
|
__construct(array $inline, array $block)
Parameters
|
# | ||||||
public
|
validateChildren(HTMLPurifier_Node[] $children, HTMLPurifier_Config $config, HTMLPurifier_Context $context): bool
Validates nodes according to definition and returns modification.
Validates nodes according to definition and returns modification. Parameters
Returnstrue to leave nodes as is, false to remove parent node, array of replacement children Implements |
# |
Methods inherited from HTMLPurifier_ChildDef |
---|
getAllowedElements(), |
Properties | |||
---|---|---|---|
public
|
|
$inline
Instance of the definition object to use when inline. Usually stricter.
Instance of the definition object to use when inline. Usually stricter. |
# |
public
|
|
$block
Instance of the definition object to use when block.
Instance of the definition object to use when block. |
# |
public
|
|
$type = 'chameleon'
|
# |
Properties inherited from HTMLPurifier_ChildDef |
---|
$allow_empty, $elements |