X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;ds=sidebyside;f=src%2FWallabag%2FCoreBundle%2FRepository%2FEntriesRepository.php;h=edbb96b4ffd61af0d9a7c0ed114ed21f5ef30ffd;hb=71691fe44a7b2a80f3b9d96d54720cce7994ad08;hp=5a71b9efe80d6606590ff38996d2419dccbcbd83;hpb=ad4d1caa9e744af57ca58a4e57576533eb682d00;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php b/src/Wallabag/CoreBundle/Repository/EntriesRepository.php index 5a71b9ef..edbb96b4 100644 --- a/src/Wallabag/CoreBundle/Repository/EntriesRepository.php +++ b/src/Wallabag/CoreBundle/Repository/EntriesRepository.php @@ -76,4 +76,17 @@ class EntriesRepository extends EntityRepository return $paginator; } + + public function findEntries($userId, $isArchived, $isStarred, $isDeleted, $sort, $order) + { + $qb = $this->createQueryBuilder('e') + ->select('e') + ->where('e.isFav =:isStarred')->setParameter('isStarred', $isStarred) + ->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived) + ->andWhere('e.userId =:userId')->setParameter('userId', $userId) + ->getQuery() + ->getResult(Query::HYDRATE_ARRAY); + + return $qb; + } }