/** * @param \Claroline\CoreBundle\Entity\Role[] $roles * @param integer $page * * @return \PagerFanta\PagerFanta */ public function getWorkspacesWithSelfUnregistrationByRoles($roles, $page) { $workspaces = $this->workspaceRepo->findWorkspacesWithSelfUnregistrationByRoles($roles); return $this->pagerFactory->createPagerFromArray($workspaces, $page); }