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';
27 require_once
'Services/Notifications/classes/class.ilNotificationSetupHelper.php';
39 if (!$ilCtrl->getCmd()) {
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);
161 $tpl->setContent(
$form->getHtml() .
$table->getHTML());
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"]);
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.
if(isset($_POST['submit'])) $form
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.
if(empty($password)) $table
static loadUserConfig($userid)
getAvailableTypes($types=array())