//TODO tous les paramètres ne sont pas utilisés, à corriger
$qb = $this->createQueryBuilder('e')
->select('e')
- ->where('e.userId =:userId')->setParameter('userId', $userId)
- ->andWhere('e.isDeleted=0');
+ ->where('e.userId =:userId')->setParameter('userId', $userId);
if (!is_null($isArchived)) {
$qb->andWhere('e.isRead =:isArchived')->setParameter('isArchived', $isArchived);
$qb->andWhere('e.isFav =:isStarred')->setParameter('isStarred', $isStarred);
}
+ if (!is_null($isDeleted)) {
+ $qb->andWhere('e.isDeleted =:isDeleted')->setParameter('isDeleted', $isDeleted);
+ }
+
return $qb
->getQuery()
->getResult(Query::HYDRATE_ARRAY);