Ejemplo n.º 1
0
 public function getUserNotification()
 {
     try {
         $notificationDAO = new NotificationDAO();
         $notificationList = $notificationDAO->getNotificationList();
         return $notificationList;
     } catch (PDOException $pdoe) {
         throw $pdoe;
     } catch (Exception $e) {
         throw $e;
     }
 }
Ejemplo n.º 2
0
 function getNotifications()
 {
     $this->view->setArg('userNotificationListFooter', NULL);
     if (!is_null(SessionUtils::getUserLogged())) {
         $notificationDAO = new NotificationDAO();
         $userNotificationList = $notificationDAO->getNotificationList(50);
         $userUnreadNotificationList = $notificationDAO->getUnreadNotificationList();
         $this->view->setArg('userNotificationListFooter', $userNotificationList);
         $this->view->setArg('userNotificationList', $userNotificationList);
         if (!is_null($userUnreadNotificationList)) {
             $this->view->setArg('unreadNotification', sizeof($userUnreadNotificationList));
         } else {
             $this->view->setArg('unreadNotification', 0);
         }
     }
 }