Example #1
0
 /**
  * @param \Claroline\CoreBundle\Entity\Role[] $roles
  * @param string                              $name
  * @param int                                 $page
  * @param int                                 $max
  * @param string                              $orderedBy
  *
  * @return \PagerFanta\PagerFanta
  */
 public function getGroupsByRolesAndName(array $roles, $name, $page = 1, $max = 50, $orderedBy = 'id')
 {
     $query = $this->groupRepo->findByRolesAndName($roles, $name, true, $orderedBy);
     return $this->pagerFactory->createPager($query, $page, $max);
 }