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';
29 require_once
'Services/Notifications/classes/class.ilNotificationSetupHelper.php';
39 if (!$ilCtrl->getCmd())
42 $cmd = $ilCtrl->getCmd() .
'Object';
48 return $this->handler[$type];
71 if ($ilUser->getId() == ANONYMOUS_USER_ID) {
75 $GLOBALS[
'WEB_ACCESS_WITHOUT_SESSION'] =
true;
77 require_once
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
78 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
82 $result->notifications = $notifications;
91 $GLOBALS[
'WEB_ACCESS_WITHOUT_SESSION'] =
true;
93 require_once
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
94 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
102 if (!array_key_exists($channel, $this->handler) || !is_array($this->handler[$channel]))
103 $this->handler[$channel] = array();
105 $this->handler[$channel][] =
$handler;
111 if (
$_POST[
'enable_custom_notification_configuration']) {
112 $ilUser->writePref(
'use_custom_notification_setting', 1);
115 $ilUser->writePref(
'use_custom_notification_setting', 0);
125 require_once
'Services/Notifications/classes/class.ilNotificationSettingsTable.php';
126 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
130 $lng->loadLanguageModule(
'notification');
132 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
134 $chk =
new ilCheckboxInputGUI($lng->txt(
'enable_custom_notification_configuration'),
'enable_custom_notification_configuration');
136 $chk->setChecked($ilUser->getPref(
'use_custom_notification_setting') == 1);
137 $form->addItem($chk);
139 $form->setFormAction($ilCtrl->getFormAction($this,
'showSettingsObject'));
140 $form->addCommandButton(
'saveCustomizingOption', $lng->txt(
'save'));
141 $form->addCommandButton(
'showSettings', $lng->txt(
'cancel'));
145 $table->setFormAction($ilCtrl->getFormAction($this,
'saveSettings'));
148 if ($ilUser->getPref(
'use_custom_notification_setting') == 1) {
149 $table->addCommandButton(
'saveSettings', $lng->txt(
'save'));
150 $table->addCommandButton(
'showSettings', $lng->txt(
'cancel'));
151 $table->setEditable(
true);
154 $table->setEditable(
false);
157 $tpl->setContent($form->getHtml() . $table->getHTML());
162 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
171 if (is_object($this->
object)) {
172 $ilLocator->addItem($this->object->getTitle(), $ilCtrl->getLinkTarget($this,
''),
'',
$_GET[
"ref_id"]);