ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Notifications\Provider\NotificationsPushProvider Class Reference
+ Collaboration diagram for ILIAS\Notifications\Provider\NotificationsPushProvider:

Public Member Functions

 __construct (PushProviderInterface $provider)
 
 push (ilObjUser $user, string $title, string $description='', ?ilNotificationLink $link=null)
 

Protected Attributes

const int TTL = 60
 
ilNotificationPushHandler $handler
 
ilNotificationConfig $config
 

Detailed Description

Definition at line 32 of file NotificationsPushProvider.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\Notifications\Provider\NotificationsPushProvider::__construct ( PushProviderInterface  $provider)
final

Definition at line 38 of file NotificationsPushProvider.php.

39 {
40 $this->handler = new ilNotificationPushHandler($provider);
41 $this->config = new ilNotificationConfig('push');
42 $this->config->setHandlerParam('setting.user_pref', $provider->getIdentifier());
43 $this->config->setHandlerParam('setting.ttl', (string) $this::TTL);
44 }
This is the lowest common denominator of all popular browsers.
$provider
Definition: ltitoken.php:80

References $provider.

Member Function Documentation

◆ push()

ILIAS\Notifications\Provider\NotificationsPushProvider::push ( ilObjUser  $user,
string  $title,
string  $description = '',
?ilNotificationLink  $link = null 
)

Definition at line 46 of file NotificationsPushProvider.php.

46 : bool
47 {
48 $notification = new ilNotificationObject($this->config, $user);
49 $notification->title = $title;
50 $notification->shortDescription = $description;
51 $notification->links = $link ? [$link] : [];
52 $this->handler->notify($notification);
53 return $this->handler->getLastQueueResult() === PushQueueResult::SUCCEEDED;
54 }

References ILIAS\Notifications\Model\Push\SUCCEEDED.

Field Documentation

◆ $config

ilNotificationConfig ILIAS\Notifications\Provider\NotificationsPushProvider::$config
protected

Definition at line 36 of file NotificationsPushProvider.php.

◆ $handler

ilNotificationPushHandler ILIAS\Notifications\Provider\NotificationsPushProvider::$handler
protected

Definition at line 35 of file NotificationsPushProvider.php.

◆ TTL

const int ILIAS\Notifications\Provider\NotificationsPushProvider::TTL = 60
protected

Definition at line 34 of file NotificationsPushProvider.php.


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