aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/WallabagBundle/Repository
diff options
context:
space:
mode:
authorNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 17:18:56 +0100
committerNicolas LÅ“uillet <nicolas@loeuillet.org>2015-01-22 17:18:56 +0100
commit9d50517ceaeadaba227ccdbaa43a5918abd16728 (patch)
tree5aa92beb3250895079690d7ecb8b3ddde28cda15 /src/WallabagBundle/Repository
parent2b9fe72b397a239c40f8c66d83506e0e2e8d5854 (diff)
downloadwallabag-9d50517ceaeadaba227ccdbaa43a5918abd16728.tar.gz
wallabag-9d50517ceaeadaba227ccdbaa43a5918abd16728.tar.zst
wallabag-9d50517ceaeadaba227ccdbaa43a5918abd16728.zip
migrating legacy to symfony
Diffstat (limited to 'src/WallabagBundle/Repository')
-rw-r--r--src/WallabagBundle/Repository/EntriesRepository.php35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/WallabagBundle/Repository/EntriesRepository.php b/src/WallabagBundle/Repository/EntriesRepository.php
new file mode 100644
index 00000000..4c13c9c2
--- /dev/null
+++ b/src/WallabagBundle/Repository/EntriesRepository.php
@@ -0,0 +1,35 @@
1<?php
2
3namespace WallabagBundle\Repository;
4
5use Doctrine\ORM\Query;
6use Doctrine\ORM\EntityRepository;
7
8/**
9 * EntriesRepository
10 *
11 * This class was generated by the Doctrine ORM. Add your own custom
12 * repository methods below.
13 */
14class EntriesRepository extends EntityRepository
15{
16 /* public function findUnreadByUser($userId)
17 {
18 return $this->createQueryBuilder('e')
19 ->where('e.is_read = 0')
20 ->andWhere('e.user_id = :userId')
21 ->setParameter('userId', $userId)
22 ->getQuery();
23 }*/
24 public function findUnreadByUser($userId)
25 {
26 $qb = $this->createQueryBuilder('e')
27 ->select('e')
28 ->where('e.isRead = 0')
29 ->andWhere('e.userId =:userId')->setParameter('userId', $userId)
30 ->getQuery()
31 ->getResult(Query::HYDRATE_ARRAY);
32
33 return $qb;
34 }
35}