ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Badge\Notification\BadgeNotificationPrefRepository Class Reference

Badge notification repository (using user preferences. More...

+ Collaboration diagram for ILIAS\Badge\Notification\BadgeNotificationPrefRepository:

Public Member Functions

 __construct (?\ilObjUser $user=null)
 
 updateLastCheckedTimestamp ()
 Set last checked timestamp. More...
 
 getLastCheckedTimestamp ()
 Get last checked timestamp. More...
 

Protected Attributes

ilObjUser $user
 

Detailed Description

Badge notification repository (using user preferences.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file BadgeNotificationPrefRepository.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Badge\Notification\BadgeNotificationPrefRepository::__construct ( ?\ilObjUser  $user = null)

Definition at line 30 of file BadgeNotificationPrefRepository.php.

31 {
32 global $DIC;
33
34 $this->user = (is_null($user))
35 ? $DIC->user()
36 : $user;
37 }
global $DIC
Definition: shib_login.php:26

References $DIC, ILIAS\Badge\Notification\BadgeNotificationPrefRepository\$user, and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ getLastCheckedTimestamp()

ILIAS\Badge\Notification\BadgeNotificationPrefRepository::getLastCheckedTimestamp ( )

Get last checked timestamp.

Definition at line 50 of file BadgeNotificationPrefRepository.php.

50 : int
51 {
52 return (int) $this->user->getPref("badge_last_checked");
53 }

References ILIAS\Repository\user().

+ Here is the call graph for this function:

◆ updateLastCheckedTimestamp()

ILIAS\Badge\Notification\BadgeNotificationPrefRepository::updateLastCheckedTimestamp ( )

Set last checked timestamp.

Definition at line 42 of file BadgeNotificationPrefRepository.php.

42 : void
43 {
44 $this->user->writePref("badge_last_checked", (string) time());
45 }

References ILIAS\Repository\user().

+ Here is the call graph for this function:

Field Documentation

◆ $user

ilObjUser ILIAS\Badge\Notification\BadgeNotificationPrefRepository::$user
protected

The documentation for this class was generated from the following file: