ILIAS
release_6 Revision v6.24-5-g0c8bfefb3b8
◀ ilDoc Overview
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
5
namespace
ILIAS\Badge\Notification
;
6
13
class
BadgeNotificationPrefRepository
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
35
public
function
updateLastCheckedTimestamp
()
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
user()
Definition:
user.php:4
php
An exception for terminatinating execution or to throw for unit testing.
ILIAS\Badge\Notification\BadgeNotificationPrefRepository
Badge notification repository (using user preferences.
Definition:
BadgeNotificationPrefRepository.php:14
ILIAS\Badge\Notification\BadgeNotificationPrefRepository\$user
$user
Definition:
BadgeNotificationPrefRepository.php:18
ILIAS\Badge\Notification\BadgeNotificationPrefRepository\__construct
__construct(\ilObjUser $user=null)
Constructor.
Definition:
BadgeNotificationPrefRepository.php:23
ILIAS\Badge\Notification\BadgeNotificationPrefRepository\updateLastCheckedTimestamp
updateLastCheckedTimestamp()
Set last checked timestamp.
Definition:
BadgeNotificationPrefRepository.php:35
ILIAS\Badge\Notification\BadgeNotificationPrefRepository\getLastCheckedTimestamp
getLastCheckedTimestamp()
Get last checked timestamp.
Definition:
BadgeNotificationPrefRepository.php:45
ilObjUser
Definition:
class.ilObjUser.php:28
ILIAS\Badge\Notification
Definition:
BadgeNotificationPrefRepository.php:5
$DIC
$DIC
Definition:
xapitoken.php:46
Services
Badge
Notification
BadgeNotificationPrefRepository.php
Generated on Fri Oct 3 2025 20:01:00 for ILIAS by
1.9.4 (using
Doxyfile
)