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); }
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 defaultPing(BASE_CLASS_ConsoleDataEvent $event) { $event->setItemData('console', array('time' => time())); }
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); }
public function ping(BASE_CLASS_ConsoleDataEvent $event) { $userId = OW::getUser()->getId(); $activeModes = $this->service->getActiveModes(); $event->setItemData(self::CONSOLE_ITEM_KEY, array('counter' => array('all' => $this->service->countWinksForUser($userId, array(WINKS_BOL_WinksDao::STATUS_WAIT), null, $activeModes), 'new' => $this->service->countWinksForUser($userId, array(WINKS_BOL_WinksDao::STATUS_WAIT), 0, $activeModes)))); }