function onQuickFormEvent($event, $arg, &$caller) { switch ($event) { case 'createElement': $className = get_class($this); $this->{$className}($arg[0], $arg[1], $arg[2]); $caller->_registerCancelButton($this->getName()); return true; break; } return parent::onQuickFormEvent($event, $arg, $caller); }
/** * Called by HTML_QuickForm whenever form event is made on this element * * @param string $event Name of event * @param mixed $arg event arguments * @param object $caller calling object * @return bool */ function onQuickFormEvent($event, $arg, &$caller) { switch ($event) { case 'createElement': static::__construct($arg[0], $arg[1], $arg[2]); $caller->_registerCancelButton($this->getName()); return true; break; } return parent::onQuickFormEvent($event, $arg, $caller); }