public function display($tpl = null) { $eventName = 'onBefore' . ucfirst($this->doTask); $this->triggerEvent($eventName, array($tpl)); $eventName = 'onAfter' . ucfirst($this->doTask); $this->triggerEvent($eventName, array($tpl)); return true; }