Order tags by slug

This adds an orderBy clause to findAllTags(). This makes the list of
tags more useful, as the tags appear in alphanumerical order instead of
somehow random.

Signed-off-by: Jan Losinski <losinski@wh2.tu-dresden.de>
This commit is contained in:
Jan Losinski 2017-01-17 19:22:20 +01:00
parent b4d81c91de
commit 32755d5091

View File

@ -49,6 +49,7 @@ class TagRepository extends EntityRepository
->leftJoin('t.entries', 'e')
->where('e.user = :userId')->setParameter('userId', $userId)
->groupBy('t.id')
->orderBy('t.slug')
->getQuery()
->getArrayResult();