26 $this->
user = $DIC->user();
28 $this->lng = $language;
29 $this->
ui = $DIC->ui();
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());
Class ilNotificationOSDGUI.
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
__construct(\ilGlobalTemplateInterface $page, \ilLanguage $language)
ilNotificationOSDGUI constructor.