Class ilNotificationOSDGUI.
More...
◆ __construct()
◆ populatePage()
ilNotificationOSDGUI::populatePage |
( |
| ) |
|
Definition at line 35 of file class.ilNotificationOSDGUI.php.
References ilNotificationOSDHandler\getNotificationsForUser(), iljQueryUtil\initjQuery(), ilPlayerUtil\initMediaElementJs(), ui(), and user().
37 if ($this->
user->isAnonymous() || 0 === (int) $this->
user->getId()) {
41 $notificationSettings = new \ilSetting(
'notifications');
42 $chatSettings = new \ilSetting(
'chatroom');
44 $osdTemplate = new \ilTemplate(
'tpl.osd_notifications.js',
true,
true,
'Services/Notifications');
47 $osdTemplate->setVariable(
48 'NOTIFICATION_CLOSE_HTML',
49 json_encode($this->
ui->renderer()->render($this->
ui->factory()->symbol()->glyph()->close()))
51 $osdTemplate->setVariable(
'INITIAL_NOTIFICATIONS', json_encode($notifications));
52 $osdTemplate->setVariable(
53 'OSD_POLLING_INTERVALL',
54 $notificationSettings->get(
'osd_polling_intervall') ? $notificationSettings->get(
'osd_polling_intervall') :
'60' 56 $osdTemplate->setVariable(
58 $chatSettings->get(
'play_invitation_sound') && $this->
user->getPref(
'chat_play_invitation_sound') ?
'true' :
'false' 64 $this->page->addJavaScript(
'Services/Notifications/templates/default/notifications.js');
65 $this->page->addCSS(
'Services/Notifications/templates/default/osd.css');
66 $this->page->addOnLoadCode($osdTemplate->get());
static initMediaElementJs($a_tpl=null)
Init mediaelement.js scripts.
static getNotificationsForUser($user_id, $append_osd_id_to_link=true, $max_age_seconds=0)
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
◆ $lng
ilNotificationOSDGUI::$lng |
|
protected |
◆ $page
ilNotificationOSDGUI::$page |
|
protected |
◆ $ui
ilNotificationOSDGUI::$ui |
|
private |
◆ $user
ilNotificationOSDGUI::$user |
|
protected |
The documentation for this class was generated from the following file: