Example #1
0
 /**
  * @param string[] $roleNames
  * @param integer  $page
  *
  * @return \PagerFanta\PagerFanta
  */
 public function getWorkspacesByRoleNamesPager(array $roleNames, $page)
 {
     if (count($roleNames) > 0) {
         $workspaces = $this->workspaceRepo->findMyWorkspacesByRoleNames($roleNames);
     } else {
         $workspaces = array();
     }
     return $this->pagerFactory->createPagerFromArray($workspaces, $page);
 }