mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-13 13:54:23 +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 type $params
|
||||||
* @param User $currentUser
|
* @param User $currentUser
|
||||||
|
* @param int $firstResult
|
||||||
|
* @param int $maxResults
|
||||||
* @return type
|
* @return type
|
||||||
*/
|
*/
|
||||||
public function findByParameters($params, User $currentUser)
|
public function findByParameters($params, User $currentUser, int $firstResult = 0, int $maxResults = 50)
|
||||||
{
|
{
|
||||||
$qb = $this->createQueryBuilder('st');
|
$qb = $this->createQueryBuilder('st');
|
||||||
|
|
||||||
$this->buildQuery($qb, $params, $currentUser);
|
$this->buildQuery($qb, $params, $currentUser);
|
||||||
|
|
||||||
|
$qb
|
||||||
|
->setMaxResults($maxResults)
|
||||||
|
->setFirstResult($firstResult)
|
||||||
|
;
|
||||||
|
|
||||||
return $qb
|
return $qb
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult()
|
->getResult()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user