]> git.immae.eu Git - github/wallabag/wallabag.git/blobdiff - src/Wallabag/CoreBundle/Repository/EntriesRepository.php
add documentation for API
[github/wallabag/wallabag.git] / src / Wallabag / CoreBundle / Repository / EntriesRepository.php
index 5a71b9efe80d6606590ff38996d2419dccbcbd83..edbb96b4ffd61af0d9a7c0ed114ed21f5ef30ffd 100644 (file)
@@ -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;
+    }
 }