Example #1
0
 private function processNotifications()
 {
     $this->trigger("BeforeProcessNotifications", $this);
     if (!is_object($this->notifyStorage)) {
         $this->notifyStorage = Storage::createWithSession('ControllerNotify');
     }
     $notes = $this->notifyStorage['notify'];
     if (!is_array($notes) || empty($notes)) {
         return '';
     }
     $this->addScript("jquery.jgrowl.js");
     $this->addCSS("jquery.jgrowl.css");
     $tpl = new Template(Config::get('ROOT_DIR') . '/includes/widgets/templates', 'notify.tpl');
     $tpl->setParamsArray(array('list' => $notes));
     unset($this->notifyStorage['notify']);
     return $tpl->getHTML();
 }