Moodle PHP Documentation 4.3
Moodle 4.3.5 (Build: 20240610) (7dcfaa79f78)
HTMLPurifier_AttrTransform_BoolToCSS Class Reference
Inheritance diagram for HTMLPurifier_AttrTransform_BoolToCSS:
HTMLPurifier_AttrTransform

Public Member Functions

 __construct ($attr, $css)
 
 confiscateAttr (&$attr, $key)
 Retrieves and removes an attribute.
 
 prependCSS (&$attr, $css)
 Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.
 
 transform ($attr, $config, $context)
 

Protected Attributes

 $attr
 Name of boolean attribute that is trigger.
 
 $css
 CSS declarations to add to style, needs trailing semicolon.
 

Constructor & Destructor Documentation

◆ __construct()

HTMLPurifier_AttrTransform_BoolToCSS::__construct ( $attr,
$css )
Parameters
string$attrattribute name to convert from
string$cssCSS declarations to add to style (needs semicolon)

Member Function Documentation

◆ confiscateAttr()

HTMLPurifier_AttrTransform::confiscateAttr ( & $attr,
$key )
inherited

Retrieves and removes an attribute.

Parameters
array&$attrAttribute array to process (passed by reference)
mixed$keyKey of attribute to confiscate
Return values
mixed

◆ prependCSS()

HTMLPurifier_AttrTransform::prependCSS ( & $attr,
$css )
inherited

Prepends CSS properties to the style attribute, creating the attribute if it doesn't exist.

Parameters
array&$attrAttribute array to process (passed by reference)
string$cssCSS to prepend

◆ transform()

HTMLPurifier_AttrTransform_BoolToCSS::transform ( $attr,
$config,
$context )
Parameters
array$attr
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Return values
array

Reimplemented from HTMLPurifier_AttrTransform.

Member Data Documentation

◆ $attr

HTMLPurifier_AttrTransform_BoolToCSS::$attr
protected

Name of boolean attribute that is trigger.

@type string

◆ $css

HTMLPurifier_AttrTransform_BoolToCSS::$css
protected

CSS declarations to add to style, needs trailing semicolon.

@type string


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