/** * Processes the widget events. Returns true, if the event template code * should be shown. * @param string $name The event name. * @return boolean */ public function processEvent($name) { switch ($name) { case 'error': if (!$this->_item->isValid()) { return true; } return false; case 'required': return $this->_item->getRequired(); } }