aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/CoreBundle/Repository/TagRepository.php
diff options
context:
space:
mode:
authorAlexandr Danilov <bitbucket@modos189.ru>2015-08-10 12:27:12 +0300
committerAlexandr Danilov <bitbucket@modos189.ru>2015-08-10 12:27:12 +0300
commit4919584b8758b23e127536b686776c1c41b3d215 (patch)
tree80288df2d6588fd84d0d028fe0ea652131a48c9a /src/Wallabag/CoreBundle/Repository/TagRepository.php
parent946d6a512470613aa5ffa556b6547397064dd89f (diff)
parent47cadf36c8f7c20ba1edf26e184637d33a52cf35 (diff)
downloadwallabag-4919584b8758b23e127536b686776c1c41b3d215.tar.gz
wallabag-4919584b8758b23e127536b686776c1c41b3d215.tar.zst
wallabag-4919584b8758b23e127536b686776c1c41b3d215.zip
Merge remote-tracking branch 'origin/v2' into v2_fix_material
# Conflicts: # src/Wallabag/CoreBundle/Resources/views/themes/material/base.html.twig
Diffstat (limited to 'src/Wallabag/CoreBundle/Repository/TagRepository.php')
-rw-r--r--src/Wallabag/CoreBundle/Repository/TagRepository.php18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/Wallabag/CoreBundle/Repository/TagRepository.php b/src/Wallabag/CoreBundle/Repository/TagRepository.php
index 52f319f1..51f1cd42 100644
--- a/src/Wallabag/CoreBundle/Repository/TagRepository.php
+++ b/src/Wallabag/CoreBundle/Repository/TagRepository.php
@@ -3,7 +3,25 @@
3namespace Wallabag\CoreBundle\Repository; 3namespace Wallabag\CoreBundle\Repository;
4 4
5use Doctrine\ORM\EntityRepository; 5use Doctrine\ORM\EntityRepository;
6use Pagerfanta\Adapter\DoctrineORMAdapter;
7use Pagerfanta\Pagerfanta;
6 8
7class TagRepository extends EntityRepository 9class TagRepository extends EntityRepository
8{ 10{
11 /**
12 * Find Tags.
13 *
14 * @param int $userId
15 *
16 * @return array
17 */
18 public function findTags($userId)
19 {
20 $qb = $this->createQueryBuilder('t')
21 ->where('t.user =:userId')->setParameter('userId', $userId);
22
23 $pagerAdapter = new DoctrineORMAdapter($qb);
24
25 return new Pagerfanta($pagerAdapter);
26 }
9} 27}