andWhere('.done = :done') ->setParameter(':done', $done); } public function filterUser($user) { return $this ->leftJoin('.users', 'u') ->having('COUNT(u.id) = 0') ->orHaving(':user MEMBER OF .users') ->setParameter(':user', $user) ->groupBy('.id'); } public function filterCrudAction($crudAction) { if(is_null($crudAction)) { return $this ->andWhere('.crudControllerFqcn IS NULL'); } else { return $this ->andWhere('.crudAction = :crudAction') ->setParameter(':crudAction', $crudAction); } } public function filterCrudControllerFqcn($crudControllerFqcn) { if(is_null($crudControllerFqcn)) { return $this ->andWhere('.crudControllerFqcn IS NULL'); } else { return $this ->andWhere('.crudControllerFqcn = :crudControllerFqcn') ->setParameter(':crudControllerFqcn', $crudControllerFqcn); } } public function filterEntityId($entityId) { if(is_null($entityId)) { return $this ->andWhere('.entityId IS NULL'); } else { return $this ->andWhere('.entityId = :entityId') ->setParameter(':entityId', $entityId); } } public function orderDefault() { return $this ->orderBy('.dateReminder', 'ASC'); } }