/** * Marks given user notifications as viewed * * @param UserInterface $user The user * @param int|null $id If null, all notifications will be marked as viewed */ public function markAsViewed(UserInterface $user, $id) { $this->repository->markAsViewed($user, $id); }