ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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.

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

31  {
32  global $DIC;
33 
34  $this->user = (is_null($user))
35  ? $DIC->user()
36  : $user;
37  }
global $DIC
Definition: feed.php:28
+ 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.

References ILIAS\Repository\user().

50  : int
51  {
52  return (int) $this->user->getPref("badge_last_checked");
53  }
+ 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.

References ILIAS\Repository\user().

42  : void
43  {
44  $this->user->writePref("badge_last_checked", (string) time());
45  }
+ 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: