aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php')
-rw-r--r--src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php32
1 files changed, 16 insertions, 16 deletions
diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
index da361308..014c29b6 100644
--- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
+++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php
@@ -10,22 +10,6 @@ use Doctrine\ORM\EntityRepository;
10class AnnotationRepository extends EntityRepository 10class AnnotationRepository extends EntityRepository
11{ 11{
12 /** 12 /**
13 * Return a query builder to used by other getBuilderFor* method.
14 *
15 * @param int $userId
16 *
17 * @return QueryBuilder
18 */
19 private function getBuilderByUser($userId)
20 {
21 return $this->createQueryBuilder('a')
22 ->leftJoin('a.user', 'u')
23 ->andWhere('u.id = :userId')->setParameter('userId', $userId)
24 ->orderBy('a.id', 'desc')
25 ;
26 }
27
28 /**
29 * Retrieves all annotations for a user. 13 * Retrieves all annotations for a user.
30 * 14 *
31 * @param int $userId 15 * @param int $userId
@@ -139,4 +123,20 @@ class AnnotationRepository extends EntityRepository
139 ->getQuery() 123 ->getQuery()
140 ->getResult(); 124 ->getResult();
141 } 125 }
126
127 /**
128 * Return a query builder to used by other getBuilderFor* method.
129 *
130 * @param int $userId
131 *
132 * @return QueryBuilder
133 */
134 private function getBuilderByUser($userId)
135 {
136 return $this->createQueryBuilder('a')
137 ->leftJoin('a.user', 'u')
138 ->andWhere('u.id = :userId')->setParameter('userId', $userId)
139 ->orderBy('a.id', 'desc')
140 ;
141 }
142} 142}