4 require_once
'./Services/Object/classes/class.ilObjectGUI.php';
5 require_once
'Services/Notifications/classes/class.ilNotificationConfig.php';
6 require_once
'Services/Notifications/classes/class.ilNotificationHandler.php';
28 require_once
'Services/Notifications/classes/class.ilNotificationSetupHelper.php';
40 if(!$ilCtrl->getCmd())
43 $cmd = $ilCtrl->getCmd() .
'Object';
50 return $this->handler[$type];
76 if($ilUser->getId() == ANONYMOUS_USER_ID)
81 require_once
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
82 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
86 $result->notifications = $notifications;
98 require_once
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
99 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
108 if(!array_key_exists($channel, $this->handler) || !is_array($this->handler[$channel]))
109 $this->handler[$channel] =
array();
111 $this->handler[$channel][] =
$handler;
118 if(
$_POST[
'enable_custom_notification_configuration'])
120 $ilUser->writePref(
'use_custom_notification_setting', 1);
124 $ilUser->writePref(
'use_custom_notification_setting', 0);
134 require_once
'Services/Notifications/classes/class.ilNotificationSettingsTable.php';
135 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
139 $lng->loadLanguageModule(
'notification');
141 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
143 $chk =
new ilCheckboxInputGUI($lng->txt(
'enable_custom_notification_configuration'),
'enable_custom_notification_configuration');
145 $chk->setChecked($ilUser->getPref(
'use_custom_notification_setting') == 1);
146 $form->addItem($chk);
148 $form->setFormAction($ilCtrl->getFormAction($this,
'showSettingsObject'));
149 $form->addCommandButton(
'saveCustomizingOption', $lng->txt(
'save'));
150 $form->addCommandButton(
'showSettings', $lng->txt(
'cancel'));
154 $table->setFormAction($ilCtrl->getFormAction($this,
'saveSettings'));
157 if($ilUser->getPref(
'use_custom_notification_setting') == 1)
159 $table->addCommandButton(
'saveSettings', $lng->txt(
'save'));
160 $table->addCommandButton(
'showSettings', $lng->txt(
'cancel'));
161 $table->setEditable(
true);
165 $table->setEditable(
false);
168 $tpl->setContent($form->getHtml() . $table->getHTML());
174 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
184 if(is_object($this->
object))
186 $ilLocator->addItem($this->
object->getTitle(), $ilCtrl->getLinkTarget($this,
''),
'',
$_GET[
"ref_id"]);
getOSDNotificationsObject()
Returns the pending on screen notifications for a user request.
static enableWebAccessWithoutSession($enable_web_access_without_session)
static removeNotification($notification_osd_id)
Removes a notifcation and triggers a follow up notification to remove the notification from the brows...
Base class for notification handlers.
getAvailableChannels($types=array())
removeOSDNotificationsObject()
__construct()
Constructor public.
addHandler($channel, ilNotificationHandler $handler)
Create styles array
The data for the language used.
static getNotificationsForUser($user_id, $append_osd_id_to_link=true, $max_age_seconds=0)
Create new PHPExcel object
obj_idprivate
static getAvailableTypes($config_types=array())
static setUserConfig($userid, array $configArray)
Sets the configuration for all given configurations.
saveCustomizingOptionObject()
static getAvailableChannels($config_types=array(), $includeDisabled=false)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
static loadUserConfig($userid)
getAvailableTypes($types=array())