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
}
ILIAS\Badge\Notification\BadgeNotificationPrefRepository\getLastCheckedTimestamp
getLastCheckedTimestamp()
Get last checked timestamp.
Definition:
BadgeNotificationPrefRepository.php:45
ILIAS\Badge\Notification
Definition:
BadgeNotificationPrefRepository.php:5
ILIAS\Badge\Notification\BadgeNotificationPrefRepository
Badge notification repository (using user preferences.
Definition:
BadgeNotificationPrefRepository.php:13
user
user()
Definition:
user.php:4
ILIAS\Badge\Notification\BadgeNotificationPrefRepository\updateLastCheckedTimestamp
updateLastCheckedTimestamp()
Set last checked timestamp.
Definition:
BadgeNotificationPrefRepository.php:35
ilObjUser
ILIAS\Badge\Notification\BadgeNotificationPrefRepository\$user
$user
Definition:
BadgeNotificationPrefRepository.php:18
ILIAS\Badge\Notification\BadgeNotificationPrefRepository\__construct
__construct(\ilObjUser $user=null)
Constructor.
Definition:
BadgeNotificationPrefRepository.php:23
$DIC
$DIC
Definition:
xapitoken.php:46
Services
Badge
Notification
BadgeNotificationPrefRepository.php
Generated on Wed Sep 3 2025 20:01:09 for ILIAS by
1.8.13 (using
Doxyfile
)