ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
HTMLPurifier_AttrTransform_BoolToCSS Class Reference

Pre-transform that changes converts a boolean attribute to fixed CSS. More...

+ Inheritance diagram for HTMLPurifier_AttrTransform_BoolToCSS:
+ Collaboration diagram for HTMLPurifier_AttrTransform_BoolToCSS:

Public Member Functions

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

Protected Attributes

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

Detailed Description

Pre-transform that changes converts a boolean attribute to fixed CSS.

Definition at line 6 of file BoolToCSS.php.

Constructor & Destructor Documentation

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

Definition at line 24 of file BoolToCSS.php.

References $attr, and $css.

{
$this->attr = $attr;
$this->css = $css;
}

Member Function Documentation

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

Reimplemented from HTMLPurifier_AttrTransform.

Definition at line 36 of file BoolToCSS.php.

References $attr, and HTMLPurifier_AttrTransform\prependCSS().

{
if (!isset($attr[$this->attr])) {
return $attr;
}
unset($attr[$this->attr]);
$this->prependCSS($attr, $this->css);
return $attr;
}

+ Here is the call graph for this function:

Field Documentation

HTMLPurifier_AttrTransform_BoolToCSS::$attr
protected

Name of boolean attribute that is trigger.

string

Definition at line 12 of file BoolToCSS.php.

Referenced by __construct(), and transform().

HTMLPurifier_AttrTransform_BoolToCSS::$css
protected

CSS declarations to add to style, needs trailing semicolon.

string

Definition at line 18 of file BoolToCSS.php.

Referenced by __construct().


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