public function getMessagesPager(Subject $subject, $page = 1, $max = 20)
    {
        $messages = $this->messageRepo->findBySubject($subject);

        return $this->pagerFactory->createPagerFromArray($messages, $page, $max);
    }
public function getMessagesPager(Subject $subject, $page = 1, $max = 20)
    {
        $messages = $this->messageRepo->findBySubject($subject);

        return $this->pagerFactory->createPagerFromArray($messages, $page, $max);
    }
public function getMessagesPager ( Subject $ subject , $ page = 1 , $ max = 20 ) { $ messages = $ this -> messageRepo -> findBySubject ( $ subject ) ; return $ this -> pagerFactory -> createPagerFromArray ( $ messages , $ page , $ max ) ; }
Get the pager for the message list of a subject.

@param \Claroline\ForumBundle\Entity\Subject $subject
@param integer $page
@param integer $max

@return \Pagerfanta\Pagerfanta
Get the pager for the message list of a subject .