aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/EntryRepository.php
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/EntryRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/EntryRepository.php14
1 files changed, 13 insertions, 1 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/EntryRepository.php b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
index 9bda4e15..4bbd05ff 100644
--- a/src/Wallabag/CoreBundle/Repository/EntryRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/EntryRepository.php
@@ -4,6 +4,7 @@ namespace Wallabag\CoreBundle\Repository;
4 4
5use Doctrine\ORM\EntityRepository; 5use Doctrine\ORM\EntityRepository;
6use Doctrine\ORM\Query; 6use Doctrine\ORM\Query;
7use Doctrine\ORM\QueryBuilder;
7use Pagerfanta\Adapter\DoctrineORMAdapter; 8use Pagerfanta\Adapter\DoctrineORMAdapter;
8use Pagerfanta\Pagerfanta; 9use Pagerfanta\Pagerfanta;
9use Wallabag\CoreBundle\Entity\Tag; 10use Wallabag\CoreBundle\Entity\Tag;
@@ -89,7 +90,7 @@ class EntryRepository extends EntityRepository
89 * 90 *
90 * @param int $userId 91 * @param int $userId
91 * @param string $term 92 * @param string $term
92 * @param strint $currentRoute 93 * @param string $currentRoute
93 * 94 *
94 * @return QueryBuilder 95 * @return QueryBuilder
95 */ 96 */
@@ -414,4 +415,15 @@ class EntryRepository extends EntityRepository
414 ->getQuery() 415 ->getQuery()
415 ->getResult(); 416 ->getResult();
416 } 417 }
418
419 /**
420 * @param $userId
421 * @return QueryBuilder
422 */
423 public function getBuilderForRecommendationsByUser($userId)
424 {
425 return $this->getBuilderByUser($userId)
426 ->andWhere('e.recommended = true')
427 ;
428 }
417} 429}