mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-12 21:34:25 +00:00
add firstresult/maxresult in SingleTaskRepository
This commit is contained in:
parent
eadaeaef35
commit
4a8e252fdb
@ -74,14 +74,21 @@ class SingleTaskRepository extends \Doctrine\ORM\EntityRepository
|
||||
*
|
||||
* @param type $params
|
||||
* @param User $currentUser
|
||||
* @param int $firstResult
|
||||
* @param int $maxResults
|
||||
* @return type
|
||||
*/
|
||||
public function findByParameters($params, User $currentUser)
|
||||
public function findByParameters($params, User $currentUser, int $firstResult = 0, int $maxResults = 50)
|
||||
{
|
||||
$qb = $this->createQueryBuilder('st');
|
||||
|
||||
$this->buildQuery($qb, $params, $currentUser);
|
||||
|
||||
$qb
|
||||
->setMaxResults($maxResults)
|
||||
->setFirstResult($firstResult)
|
||||
;
|
||||
|
||||
return $qb
|
||||
->getQuery()
|
||||
->getResult()
|
||||
|
Loading…
x
Reference in New Issue
Block a user