ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
global $DIC
Definition: shib_login.php:26