ILIAS  release_7 Revision v7.30-3-g800a261c036
BadgeNotificationPrefRepository.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 1998-2019 ILIAS open source, Extended GPL, see docs/LICENSE */
4
6
14{
18 protected $user;
19
23 public function __construct(\ilObjUser $user = null)
24 {
25 global $DIC;
26
27 $this->user = (is_null($user))
28 ? $DIC->user()
29 : $user;
30 }
31
36 {
37 $this->user->writePref("badge_last_checked", time());
38 }
39
45 public function getLastCheckedTimestamp()
46 {
47 return (int) $this->user->getPref("badge_last_checked");
48 }
49}
user()
Definition: user.php:4
An exception for terminatinating execution or to throw for unit testing.
Badge notification repository (using user preferences.
global $DIC
Definition: goto.php:24