]>
Commit | Line | Data |
---|---|---|
22a4b20e TC |
1 | <?php |
2 | ||
3 | namespace Wallabag\CoreBundle\Repository; | |
4 | ||
5 | use Doctrine\ORM\EntityRepository; | |
6 | ||
7 | class NotificationRepository extends EntityRepository { | |
8 | ||
9 | public function markAllAsReadForUser($userId) { | |
10 | return $this->getEntityManager()->createQueryBuilder() | |
11 | ->update('WallabagCoreBundle:Notification', 'n') | |
12 | ->set('n.read', true) | |
13 | ->where('n.user = :userId')->setParameter('userId', $userId) | |
14 | ->getQuery() | |
15 | ->getResult(); | |
16 | } | |
17 | } |