public function getNotificationsReadAction(User $user)
    {
        $this->notificationManager->markAllNotificationsAsViewed($user->getId());

        return $this->notificationManager->getUserNotifications($user);
    }
public function getNotificationsReadAction(User $user)
    {
        $this->notificationManager->markAllNotificationsAsViewed($user->getId());

        return $this->notificationManager->getUserNotifications($user);
    }
public function getNotificationsReadAction ( User $ user ) { $ this -> notificationManager -> markAllNotificationsAsViewed ( $ user -> getId ( ) ) ; return $ this -> notificationManager -> getUserNotifications ( $ user ) ; }
Mark all notifications as read.

@Route("/notifications/read.{_format}", name="icap_notifications_read", defaults={"_format":"json"})
@View(serializerGroups={"api_notification"})
@EXT\ParamConverter("user", converter="current_user")
Mark all notifications as read .