ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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)
 Constructor. More...
 
 updateLastCheckedTimestamp ()
 Set last checked timestamp. More...
 
 getLastCheckedTimestamp ()
 Get last checked timestamp. More...
 

Protected Attributes

 $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 13 of file BadgeNotificationPrefRepository.php.

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Definition at line 23 of file BadgeNotificationPrefRepository.php.

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

24  {
25  global $DIC;
26 
27  $this->user = (is_null($user))
28  ? $DIC->user()
29  : $user;
30  }
user()
Definition: user.php:4
$DIC
Definition: xapitoken.php:46
+ Here is the call graph for this function:

Member Function Documentation

◆ getLastCheckedTimestamp()

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

Get last checked timestamp.

Returns
int

Definition at line 45 of file BadgeNotificationPrefRepository.php.

References user().

46  {
47  return (int) $this->user->getPref("badge_last_checked");
48  }
user()
Definition: user.php:4
+ Here is the call graph for this function:

◆ updateLastCheckedTimestamp()

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

Set last checked timestamp.

Definition at line 35 of file BadgeNotificationPrefRepository.php.

References user().

36  {
37  $this->user->writePref("badge_last_checked", time());
38  }
user()
Definition: user.php:4
+ Here is the call graph for this function:

Field Documentation

◆ $user

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

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