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];
74 if($ilUser->getId() == ANONYMOUS_USER_ID)
79 require_once
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
80 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
84 $result->notifications = $notifications;
94 require_once
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
95 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
104 if(!array_key_exists($channel, $this->handler) || !is_array($this->handler[$channel]))
105 $this->handler[$channel] = array();
107 $this->handler[$channel][] =
$handler;
114 if(
$_POST[
'enable_custom_notification_configuration'])
116 $ilUser->writePref(
'use_custom_notification_setting', 1);
120 $ilUser->writePref(
'use_custom_notification_setting', 0);
130 require_once
'Services/Notifications/classes/class.ilNotificationSettingsTable.php';
131 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
135 $lng->loadLanguageModule(
'notification');
137 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
139 $chk =
new ilCheckboxInputGUI($lng->txt(
'enable_custom_notification_configuration'),
'enable_custom_notification_configuration');
141 $chk->setChecked($ilUser->getPref(
'use_custom_notification_setting') == 1);
142 $form->addItem($chk);
144 $form->setFormAction($ilCtrl->getFormAction($this,
'showSettingsObject'));
145 $form->addCommandButton(
'saveCustomizingOption', $lng->txt(
'save'));
146 $form->addCommandButton(
'showSettings', $lng->txt(
'cancel'));
150 $table->setFormAction($ilCtrl->getFormAction($this,
'saveSettings'));
153 if($ilUser->getPref(
'use_custom_notification_setting') == 1)
155 $table->addCommandButton(
'saveSettings', $lng->txt(
'save'));
156 $table->addCommandButton(
'showSettings', $lng->txt(
'cancel'));
157 $table->setEditable(
true);
161 $table->setEditable(
false);
164 $tpl->setContent($form->getHtml() . $table->getHTML());
170 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
180 if(is_object($this->
object))
182 $ilLocator->addItem($this->object->getTitle(), $ilCtrl->getLinkTarget($this,
''),
'',
$_GET[
"ref_id"]);