38 $notificationSettings = new \ilSetting(
'notifications');
39 $chatSettings = new \ilSetting(
'chatroom');
41 $osdTemplate = new \ilTemplate(
'tpl.osd_notifications.js',
true,
true,
'Services/Notifications');
43 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
44 require_once
'Services/UIComponent/Glyph/classes/class.ilGlyphGUI.php';
48 $osdTemplate->setVariable(
'INITIAL_NOTIFICATIONS', json_encode($notifications));
49 $osdTemplate->setVariable(
'OSD_POLLING_INTERVALL', $notificationSettings->get(
'osd_polling_intervall') ? $notificationSettings->get(
'osd_polling_intervall') :
'60');
50 $osdTemplate->setVariable(
'OSD_PLAY_SOUND', $chatSettings->get(
'play_invitation_sound') && $this->
user->getPref(
'chat_play_invitation_sound') ?
'true' :
'false');
52 require_once
"Services/jQuery/classes/class.iljQueryUtil.php";
55 require_once
'Services/MediaObjects/classes/class.ilPlayerUtil.php';
58 $this->mainTemplate->addJavaScript(
'Services/Notifications/templates/default/notifications.js');
59 $this->mainTemplate->addCSS(
'Services/Notifications/templates/default/osd.css');
60 $this->mainTemplate->addOnLoadCode($osdTemplate ->
get());
Class ilNotificationOSDGUI.
static get($a_glyph, $a_text="")
Get glyph html.
special template class to simplify handling of ITX/PEAR
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($a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
__construct(\ilObjUser $user, \ilTemplate $mainTemplate, \ilLanguage $lng)
ilNotificationOSDGUI constructor.