Esempio n. 1
0
 public function ping(BASE_CLASS_ConsoleDataEvent $event)
 {
     $userId = OW::getUser()->getId();
     $data = $event->getItemData(self::CONSOLE_ITEM_KEY);
     $allInvitationCount = $this->service->count(null, $userId, FRIENDS_BOL_Service::STATUS_PENDING);
     $newInvitationCount = $this->service->count(null, $userId, FRIENDS_BOL_Service::STATUS_PENDING, null, false);
     $data['counter'] = array('all' => $allInvitationCount, 'new' => $newInvitationCount);
     $event->setItemData('friend_requests', $data);
 }
Esempio n. 2
0
 public function ping(BASE_CLASS_ConsoleDataEvent $event)
 {
     $userId = OW::getUser()->getId();
     $data = $event->getItemData(self::CONSOLE_ITEM_KEY);
     $newInvitationCount = $this->service->getNewConsoleConversationCount($userId);
     $viewInvitationCount = $this->service->getVievedConversationCountForConsole($userId);
     $data['counter'] = array('all' => $newInvitationCount + $viewInvitationCount, 'new' => $newInvitationCount);
     $event->setItemData('mailbox', $data);
 }
 public function ping(BASE_CLASS_ConsoleDataEvent $event)
 {
     $userId = OW::getUser()->getId();
     $data = $event->getItemData(self::CONSOLE_ITEM_KEY);
     $newNotificationCount = $this->service->findNotificationCount($userId, false);
     $allNotificationCount = $this->service->findNotificationCount($userId);
     $data['counter'] = array('all' => $allNotificationCount, 'new' => $newNotificationCount);
     $event->setItemData(self::CONSOLE_ITEM_KEY, $data);
 }