X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=src%2FWallabag%2FAnnotationBundle%2FRepository%2FAnnotationRepository.php;h=014c29b65f97b39758880c894106652dbcf830d3;hb=f808b01692a835673f328d7221ba8c212caa9b61;hp=3af53805bd1a9db1741525ffc801b6a1696c9334;hpb=9102851f59d960869b210bb26ab0e9c266781c4f;p=github%2Fwallabag%2Fwallabag.git diff --git a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php index 3af53805..014c29b6 100644 --- a/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php +++ b/src/Wallabag/AnnotationBundle/Repository/AnnotationRepository.php @@ -9,22 +9,6 @@ use Doctrine\ORM\EntityRepository; */ class AnnotationRepository extends EntityRepository { - /** - * Return a query builder to used by other getBuilderFor* method. - * - * @param int $userId - * - * @return QueryBuilder - */ - private function getBuilderByUser($userId) - { - return $this->createQueryBuilder('a') - ->leftJoin('a.user', 'u') - ->andWhere('u.id = :userId')->setParameter('userId', $userId) - ->orderBy('a.id', 'desc') - ; - } - /** * Retrieves all annotations for a user. * @@ -130,7 +114,7 @@ class AnnotationRepository extends EntityRepository * * @return mixed */ - public function findAllByArchivedEntriesAndUserId($userId) + public function findAllArchivedEntriesByUser($userId) { return $this->createQueryBuilder('a') ->leftJoin('a.entry', 'e') @@ -139,4 +123,20 @@ class AnnotationRepository extends EntityRepository ->getQuery() ->getResult(); } + + /** + * Return a query builder to used by other getBuilderFor* method. + * + * @param int $userId + * + * @return QueryBuilder + */ + private function getBuilderByUser($userId) + { + return $this->createQueryBuilder('a') + ->leftJoin('a.user', 'u') + ->andWhere('u.id = :userId')->setParameter('userId', $userId) + ->orderBy('a.id', 'desc') + ; + } }