1
0
Fork 0
mirror of https://github.com/wallabag/wallabag.git synced 2025-10-05 19:31:02 +00:00

Add pagination

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2017-04-27 16:23:54 +02:00 committed by Nicolas Lœuillet
parent c37515f880
commit 50cfd8108b
3 changed files with 45 additions and 12 deletions

View file

@ -60,11 +60,9 @@ class UserRepository extends EntityRepository
*
* @return QueryBuilder
*/
public function getUsersForSearch($term)
public function getQueryBuilderForSearch($term)
{
return $this->createQueryBuilder('u')
->andWhere('lower(u.username) LIKE lower(:term) OR lower(u.email) LIKE lower(:term) OR lower(u.name) LIKE lower(:term)')->setParameter('term', '%'.$term.'%')
->getQuery()
->getResult();
->andWhere('lower(u.username) LIKE lower(:term) OR lower(u.email) LIKE lower(:term) OR lower(u.name) LIKE lower(:term)')->setParameter('term', '%'.$term.'%');
}
}