Add all and none special tags
This commit is contained in:
@ -79,7 +79,11 @@ class SnipRepository extends ServiceEntityRepository
|
||||
throw new \InvalidArgumentException('Invalid sort option: ', $request->sort);
|
||||
}
|
||||
|
||||
if ($request->tag) {
|
||||
if ($request->tag === 'none') {
|
||||
$qb->andWhere('s.tags IS EMPTY');
|
||||
} elseif ($request->tag === 'all') {
|
||||
// No filter needed
|
||||
} else {
|
||||
$qb->innerJoin('s.tags', 't')
|
||||
->andWhere('t.name = :tag')
|
||||
->setParameter('tag', $request->tag)
|
||||
|
Reference in New Issue
Block a user