aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag/ApiBundle/Repository/AccessTokenRepository.php
blob: 2b8d24df38983c105fb966d299667b8dec107c91 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
<?php

namespace Wallabag\ApiBundle\Repository;

use Doctrine\ORM\EntityRepository;


class AccessTokenRepository extends EntityRepository
{
    public function findAppsByUser($userId)
    {
        $qb = $this->createQueryBuilder('a')
            ->innerJoin('a.client', 'c')
            ->addSelect('c')
            ->where('a.user =:userId')->setParameter('userId', $userId);
        return $qb->getQuery()->getResult();
    }
}