4 require_once
'classes/class.ilObjectGUI.php';
5 require_once
'Services/Notifications/classes/class.ilNotificationConfig.php';
6 require_once
'Services/Notifications/classes/class.ilNotificationHandler.php';
29 require_once
'Services/Notifications/classes/class.ilNotificationSetupHelper.php';
39 if (!$ilCtrl->getCmd())
42 $cmd = $ilCtrl->getCmd() .
'Object';
48 return $this->handler[$type];
62 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
66 $GLOBALS[
'WEB_ACCESS_WITHOUT_SESSION'] =
true;
68 require_once
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
69 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
73 $result->notifications = $notifications;
82 $GLOBALS[
'WEB_ACCESS_WITHOUT_SESSION'] =
true;
84 require_once
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
85 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
93 if (!array_key_exists($channel, $this->handler) || !is_array($this->handler[$channel]))
94 $this->handler[$channel] = array();
96 $this->handler[$channel][] =
$handler;
102 if (
$_POST[
'enable_custom_notification_configuration']) {
103 $ilUser->writePref(
'use_custom_notification_setting', 1);
106 $ilUser->writePref(
'use_custom_notification_setting', 0);
116 require_once
'Services/Notifications/classes/class.ilNotificationSettingsTable.php';
117 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
121 $lng->loadLanguageModule(
'notification');
123 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
125 $chk =
new ilCheckboxInputGUI($lng->txt(
'enable_custom_notification_configuration'),
'enable_custom_notification_configuration');
127 $chk->setChecked($ilUser->getPref(
'use_custom_notification_setting') == 1);
128 $form->addItem($chk);
130 $form->setFormAction($ilCtrl->getFormAction($this,
'showSettingsObject'));
131 $form->addCommandButton(
'saveCustomizingOption', $lng->txt(
'save'));
132 $form->addCommandButton(
'showSettings', $lng->txt(
'cancel'));
136 $table->setFormAction($ilCtrl->getFormAction($this,
'saveSettings'));
139 if ($ilUser->getPref(
'use_custom_notification_setting') == 1) {
140 $table->addCommandButton(
'saveSettings', $lng->txt(
'save'));
141 $table->addCommandButton(
'showSettings', $lng->txt(
'cancel'));
142 $table->setEditable(
true);
145 $table->setEditable(
false);
148 $tpl->setContent($form->getHtml() . $table->getHTML());
153 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
162 if (is_object($this->
object)) {
163 $ilLocator->addItem($this->object->getTitle(), $ilCtrl->getLinkTarget($this,
''),
'',
$_GET[
"ref_id"]);