ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
DenyElementDecorator.php
Go to the documentation of this file.
1<?php
2
7{
11 public $def;
15 public $element;
16
21 public function __construct($def, $element)
22 {
23 $this->def = $def;
24 $this->element = $element;
25 }
26
34 public function validate($string, $config, $context)
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 }
42}
43
44// vim: et sw=4 sts=4
Decorator which enables CSS properties to be disabled for specific elements.
validate($string, $config, $context)
Checks if CurrentToken is set and equal to $this->element.
Base class for all validating attribute definitions.
Definition: AttrDef.php:14