ILIAS  release_8 Revision v8.24
BadgeNotificationPrefRepository.php
Go to the documentation of this file.
1<?php
2
20
27{
28 protected \ilObjUser $user;
29
30 public function __construct(\ilObjUser $user = null)
31 {
32 global $DIC;
33
34 $this->user = (is_null($user))
35 ? $DIC->user()
36 : $user;
37 }
38
42 public function updateLastCheckedTimestamp(): void
43 {
44 $this->user->writePref("badge_last_checked", (string) time());
45 }
46
50 public function getLastCheckedTimestamp(): int
51 {
52 return (int) $this->user->getPref("badge_last_checked");
53 }
54}
Badge notification repository (using user preferences.
User class.
global $DIC
Definition: feed.php:28
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...