4require_once
'./Services/Object/classes/class.ilObjectGUI.php';
5require_once
'Services/Notifications/classes/class.ilNotificationConfig.php';
6require_once
'Services/Notifications/classes/class.ilNotificationHandler.php';
27 require_once
'Services/Notifications/classes/class.ilNotificationSetupHelper.php';
43 $cmd =
$ilCtrl->getCmd() .
'Object';
49 return $this->handler[
$type];
75 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;
96 require_once
'Services/Notifications/classes/class.ilNotificationEchoHandler.php';
97 require_once
'Services/Notifications/classes/class.ilNotificationOSDHandler.php';
106 if (!array_key_exists($channel, $this->handler) || !is_array($this->handler[$channel])) {
107 $this->handler[$channel] = array();
110 $this->handler[$channel][] =
$handler;
117 if (
$_POST[
'enable_custom_notification_configuration']) {
118 $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) {
154 $table->addCommandButton(
'saveSettings',
$lng->txt(
'save'));
155 $table->addCommandButton(
'showSettings',
$lng->txt(
'cancel'));
156 $table->setEditable(
true);
158 $table->setEditable(
false);
167 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
177 if (is_object($this->
object)) {
178 $ilLocator->addItem($this->object->getTitle(),
$ilCtrl->getLinkTarget($this,
''),
'',
$_GET[
"ref_id"]);
An exception for terminatinating execution or to throw for unit testing.
static getAvailableChannels($config_types=array(), $includeDisabled=false)
static loadUserConfig($userid)
static getAvailableTypes($config_types=array())
static setUserConfig($userid, array $configArray)
Sets the configuration for all given configurations.
getOSDNotificationsObject()
Returns the pending on screen notifications for a user request.
removeOSDNotificationsObject()
getAvailableTypes($types=array())
__construct()
Constructor @access public.
addHandler($channel, ilNotificationHandler $handler)
getAvailableChannels($types=array())
saveCustomizingOptionObject()
Base class for notification handlers.
static removeNotification($notification_osd_id)
Removes a notifcation and triggers a follow up notification to remove the notification from the brows...
static getNotificationsForUser($user_id, $append_osd_id_to_link=true, $max_age_seconds=0)
static enableWebAccessWithoutSession($enable_web_access_without_session)
if(empty($password)) $table
if(isset($_POST['submit'])) $form