- $qb = $this->createQueryBuilder('t')
- ->select('t')
- ->leftJoin('t.id', 'u')
- ->where('e.isStarred = true')
- ->andWhere('u.id =:userId')->setParameter('userId', $userId)
- ->orderBy('e.createdAt', 'desc')
- ->getQuery();
+ return $this->createQueryBuilder('t')
+ ->leftJoin('t.entries', 'e')
+ ->where('e.user = :userId')->setParameter('userId', $userId);
+ }
+
+ /**
+ * Find Tags and return a Pager.
+ *
+ * @param int $userId
+ *
+ * @return Pagerfanta
+ */
+ public function findTags($userId)
+ {
+ $qb = $this->getQbForAllTags($userId);