mirror of
https://github.com/wallabag/wallabag.git
synced 2024-11-30 13:01:07 +00:00
Remove useless method
This commit is contained in:
parent
2a007fe43d
commit
e9023a16eb
1 changed files with 3 additions and 15 deletions
|
@ -6,20 +6,6 @@ use Doctrine\ORM\EntityRepository;
|
||||||
|
|
||||||
class TagRepository extends EntityRepository
|
class TagRepository extends EntityRepository
|
||||||
{
|
{
|
||||||
/**
|
|
||||||
* Return only the QueryBuilder to retrieve all tags for a given user.
|
|
||||||
*
|
|
||||||
* @param int $userId
|
|
||||||
*
|
|
||||||
* @return QueryBuilder
|
|
||||||
*/
|
|
||||||
private function getQbForAllTags($userId)
|
|
||||||
{
|
|
||||||
return $this->createQueryBuilder('t')
|
|
||||||
->leftJoin('t.entries', 'e')
|
|
||||||
->where('e.user = :userId')->setParameter('userId', $userId);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Find Tags.
|
* Find Tags.
|
||||||
*
|
*
|
||||||
|
@ -29,7 +15,9 @@ class TagRepository extends EntityRepository
|
||||||
*/
|
*/
|
||||||
public function findAllTags($userId)
|
public function findAllTags($userId)
|
||||||
{
|
{
|
||||||
return $this->getQbForAllTags($userId)
|
return $this->createQueryBuilder('t')
|
||||||
|
->leftJoin('t.entries', 'e')
|
||||||
|
->where('e.user = :userId')->setParameter('userId', $userId)
|
||||||
->getQuery()
|
->getQuery()
|
||||||
->getResult();
|
->getResult();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue