示例#1
0
 /**
  * Disallow changing the 'id' attribute
  *
  * @param    string  Attribute name
  * @param    string  Attribute value, null if attribute is being removed
  */
 protected function onAttributeChange($name, $value = null)
 {
     if ('id' == $name) {
         throw new HTML_QuickForm2_InvalidArgumentException("Attribute 'id' is read-only");
     }
     parent::onAttributeChange($name, $value);
 }