ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Processes an entire attribute array for corrections needing multiple values. More...
Public Member Functions | |
transform ($attr, $config, $context) | |
Abstract: makes changes to the attributes dependent on multiple values. More... | |
prependCSS (&$attr, $css) | |
Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist. More... | |
confiscateAttr (&$attr, $key) | |
Retrieves and removes an attribute. More... | |
Processes an entire attribute array for corrections needing multiple values.
Occasionally, a certain attribute will need to be removed and popped onto another value. Instead of creating a complex return syntax for HTMLPurifier_AttrDef, we just pass the whole attribute array to a specialized object and have that do the special work. That is the family of HTMLPurifier_AttrTransform.
An attribute transformation can be assigned to run before or after HTMLPurifier_AttrDef validation. See HTMLPurifier_HTMLDefinition for more details.
Definition at line 17 of file AttrTransform.php.
HTMLPurifier_AttrTransform::confiscateAttr | ( | & | $attr, |
$key | |||
) |
Retrieves and removes an attribute.
array | &$attr | Attribute array to process (passed by reference) |
mixed | $key | Key of attribute to confiscate |
Definition at line 49 of file AttrTransform.php.
References $key.
Referenced by HTMLPurifier_AttrTransform_Background\transform(), HTMLPurifier_AttrTransform_Border\transform(), HTMLPurifier_AttrTransform_BgColor\transform(), HTMLPurifier_AttrTransform_Name\transform(), HTMLPurifier_AttrTransform_Length\transform(), and HTMLPurifier_AttrTransform_ImgSpace\transform().
HTMLPurifier_AttrTransform::prependCSS | ( | & | $attr, |
$css | |||
) |
Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.
array | &$attr | Attribute array to process (passed by reference) |
string | $css | CSS to prepend |
Definition at line 37 of file AttrTransform.php.
Referenced by HTMLPurifier_AttrTransform_Background\transform(), HTMLPurifier_AttrTransform_Border\transform(), HTMLPurifier_AttrTransform_BgColor\transform(), HTMLPurifier_AttrTransform_Length\transform(), HTMLPurifier_AttrTransform_BoolToCSS\transform(), HTMLPurifier_AttrTransform_ImgSpace\transform(), and HTMLPurifier_AttrTransform_EnumToCSS\transform().
|
abstract |
Abstract: makes changes to the attributes dependent on multiple values.
array | $attr | Assoc array of attributes, usually from HTMLPurifier_Token_Tag::$attr |
HTMLPurifier_Config | $config | Mandatory HTMLPurifier_Config object. |
HTMLPurifier_Context | $context | Mandatory HTMLPurifier_Context object |