ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
HTMLPurifier_AttrDef_CSS_DenyElementDecorator Class Reference

Decorator which enables CSS properties to be disabled for specific elements. More...

+ Inheritance diagram for HTMLPurifier_AttrDef_CSS_DenyElementDecorator:
+ Collaboration diagram for HTMLPurifier_AttrDef_CSS_DenyElementDecorator:

Public Member Functions

 __construct ($def, $element)
 
 validate ($string, $config, $context)
 Checks if CurrentToken is set and equal to $this->element. More...
 
- Public Member Functions inherited from HTMLPurifier_AttrDef
 validate ($string, $config, $context)
 Validates and cleans passed string according to a definition. More...
 
 parseCDATA ($string)
 Convenience method that parses a string as if it were CDATA. More...
 
 make ($string)
 Factory method for creating this class from a string. More...
 

Data Fields

 $def
 HTMLPurifier_AttrDef More...
 
 $element
 string More...
 
- Data Fields inherited from HTMLPurifier_AttrDef
 $minimized = false
 Tells us whether or not an HTML attribute is minimized. More...
 
 $required = false
 Tells us whether or not an HTML attribute is required. More...
 

Additional Inherited Members

- Protected Member Functions inherited from HTMLPurifier_AttrDef
 mungeRgb ($string)
 Removes spaces from rgb(0, 0, 0) so that shorthand CSS properties work properly. More...
 
 expandCSSEscape ($string)
 Parses a possibly escaped CSS string and returns the "pure" version of it. More...
 

Detailed Description

Decorator which enables CSS properties to be disabled for specific elements.

Definition at line 6 of file DenyElementDecorator.php.

Constructor & Destructor Documentation

◆ __construct()

HTMLPurifier_AttrDef_CSS_DenyElementDecorator::__construct (   $def,
  $element 
)
Parameters
HTMLPurifier_AttrDef$defDefinition to wrap
string$elementElement to deny

Definition at line 21 of file DenyElementDecorator.php.

References $def, and $element.

22  {
23  $this->def = $def;
24  $this->element = $element;
25  }

Member Function Documentation

◆ validate()

HTMLPurifier_AttrDef_CSS_DenyElementDecorator::validate (   $string,
  $config,
  $context 
)

Checks if CurrentToken is set and equal to $this->element.

Parameters
string$string
HTMLPurifier_Config$config
HTMLPurifier_Context$context
Returns
bool|string

Definition at line 34 of file DenyElementDecorator.php.

References $config.

35  {
36  $token = $context->get('CurrentToken', true);
37  if ($token && $token->name == $this->element) {
38  return false;
39  }
40  return $this->def->validate($string, $config, $context);
41  }

Field Documentation

◆ $def

HTMLPurifier_AttrDef_CSS_DenyElementDecorator::$def

HTMLPurifier_AttrDef

Definition at line 11 of file DenyElementDecorator.php.

Referenced by __construct().

◆ $element

HTMLPurifier_AttrDef_CSS_DenyElementDecorator::$element

string

Definition at line 15 of file DenyElementDecorator.php.

Referenced by __construct().


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