Esempio n. 1
0
 /**
  * @param integer $page
  * @param integer $max
  * @param string  $orderedBy
  *
  * @return \Pagerfanta\Pagerfanta;
  */
 public function findAllWorkspaces($page, $max = 20, $orderedBy = 'id', $order = null)
 {
     $result = $this->workspaceRepo->findBy(array(), array($orderedBy => $order));
     return $this->pagerFactory->createPagerFromArray($result, $page, $max);
 }
 public function getNonPersonalByCodeAndName($code, $name, $offset = null, $limit = null)
 {
     return !$code && !$name ? $this->workspaceRepo->findBy(['isPersonal' => false]) : $this->workspaceRepo->findNonPersonalByCodeAndName($code, $name, $offset, $limit);
 }