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.
*
*/
public function findAllTags($userId)
{
- return $this->getQbForAllTags($userId)
+ return $this->createQueryBuilder('t')
+ ->leftJoin('t.entries', 'e')
+ ->where('e.user = :userId')->setParameter('userId', $userId)
->getQuery()
->getResult();
}