*
* Returns a list with all groups
*/
- public function getGroups($search = '', $limit = null, $offset = null) {
+ public function getGroups(string $search = '', int $limit = -1, int $offset = 0) {
$this->fixDI();
$query = $this->dbConn->getQueryBuilder();
)));
}
- $query->setMaxResults($limit)
- ->setFirstResult($offset);
+ if (!$limit > 0) {
+ $query->setMaxResults($limit);
+ }
+ if ($offset > 0) {
+ $query->setFirstResult($offset);
+ }
$result = $query->execute();
$groups = [];
*
* Returns a list with all groups
*/
- public function getGroups($search = '', $limit = -1, $offset = 0);
+ public function getGroups(string $search = '', int $limit = -1, int $offset = 0);
/**
* check if a group exists