/** * @param \Claroline\CoreBundle\Entity\Role[] $roles * @param \Claroline\CoreBundle\Entity\Workspace\Workspace $workspace * @param int $page * @param int $max * * @return \PagerFanta\PagerFanta */ public function getOutsidersByWorkspaceRoles(array $roles, Workspace $workspace, $page = 1, $max = 50) { $query = $this->groupRepo->findOutsidersByWorkspaceRoles($roles, $workspace, true); return $this->pagerFactory->createPager($query, $page, $max); }