plugin/notification/Manager/NotificationManager.php
public function getUserNotificationsList(User $user, $page = 1, $maxResult = -1, $isRss = false, $notificationParameters = null, $category = null)
    {
        $query = $this->getUserNotifications($user, $page, $maxResult, $isRss, $notificationParameters, false, $category);
        $adapter = new DoctrineORMAdapter($query, false);
        $pager = new Pagerfanta($adapter);
        $pager->setMaxPerPage($maxResult);

        try {
            $pager->setCurrentPage($page);
        } catch (NotValidCurrentPageException $e) {
            throw new NotFoundHttpException();
        }
        $notifications = $this->renderNotifications($pager->getCurrentPageResults());

        return [
            'pager' => $pager,
            'notificationViews' => $notifications['views'],
            'colors' => $notifications['colors'],
        ];
    }
public function getUserNotificationsList(User $user, $page = 1, $maxResult = -1, $isRss = false, $notificationParameters = null, $category = null)
    {
        $query = $this->getUserNotifications($user, $page, $maxResult, $isRss, $notificationParameters, false, $category);
        $adapter = new DoctrineORMAdapter($query, false);
        $pager = new Pagerfanta($adapter);
        $pager->setMaxPerPage($maxResult);

        try {
            $pager->setCurrentPage($page);
        } catch (NotValidCurrentPageException $e) {
            throw new NotFoundHttpException();
        }
        $notifications = $this->renderNotifications($pager->getCurrentPageResults());

        return [
            'pager' => $pager,
            'notificationViews' => $notifications['views'],
            'colors' => $notifications['colors'],
        ];
    }
public function getUserNotificationsList ( User $ user , $ page = 1 , $ maxResult = - 1 , $ isRss = false , $ notificationParameters = null , $ category = null ) { $ query = $ this -> getUserNotifications ( $ user , $ page , $ maxResult , $ isRss , $ notificationParameters , false , $ category ) ; $ adapter = new DoctrineORMAdapter ( $ query , false ) ; $ pager = new Pagerfanta ( $ adapter ) ; $ pager -> setMaxPerPage ( $ maxResult ) ; try { $ pager -> setCurrentPage ( $ page ) ; } catch ( NotValidCurrentPageException $ e ) { throw new NotFoundHttpException ( ) ; } $ notifications = $ this -> renderNotifications ( $ pager -> getCurrentPageResults ( ) ) ; return [ 'pager' => $ pager , 'notificationViews' => $ notifications [ 'views' ] , 'colors' => $ notifications [ 'colors' ] , ] ; }
Retrieves the notifications list.

@param int  $userId
@param int  $page
@param int  $maxResult
@param bool $isRss

@throws \Symfony\Component\HttpKernel\Exception\NotFoundHttpException

@return mixed
Retrieves the notifications list .