filter = idx($data, 'filter'); } public function processRequest() { $request = $this->getRequest(); $user = $request->getUser(); $nav = new AphrontSideNavFilterView(); $nav->setBaseURI(new PhutilURI('/notification/')); $nav->addFilter('all', 'All Notifications'); $nav->addFilter('unread', 'Unread Notifications'); $filter = $nav->selectFilter($this->filter, 'all'); $pager = new AphrontPagerView(); $pager->setURI($request->getRequestURI(), 'offset'); $pager->setOffset($request->getInt('offset')); $query = new PhabricatorNotificationQuery(); $query->setUserPHID($user->getPHID()); switch ($filter) { case 'unread': $query->withUnread(true); $header = pht('Unread Notifications'); $no_data = pht('You have no unread notifications.'); break; default: $header = pht('Notifications'); $no_data = pht('You have no notifications.'); break; } $notifications = $query->executeWithOffsetPager($pager); if ($notifications) { $builder = new PhabricatorNotificationBuilder($notifications); $view = $builder->buildView(); } else { $view = '