+ * @return array
+ */
+ public function findAllTags($userId)
+ {
+ return $this->createQueryBuilder('t')
+ ->select('t.slug', 't.label', 't.id')
+ ->leftJoin('t.entries', 'e')
+ ->where('e.user = :userId')->setParameter('userId', $userId)
+ ->groupBy('t.slug')
+ ->addGroupBy('t.label')
+ ->addGroupBy('t.id')
+ ->getQuery()
+ ->getArrayResult();
+ }
+
+ /**
+ * Used only in test case to get a tag for our entry.