3 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
13 $lng->loadLanguageModule(
'notification');
18 'set_by_user' => $lng->txt(
'set_by_user'),
19 'set_by_admin' => $lng->txt(
'set_by_admin'),
20 'disabled' => $lng->txt(
'disabled'),
23 foreach ($types as $type) {
24 $select =
new ilSelectInputGUI($lng->txt(
'nott_' . $type[
'name']),
'notifications[' . $type[
'name'] .
']');
26 $select->setValue($type[
'config_type']);
27 $form->addItem($select);
39 'set_by_user' => $lng->txt(
'set_by_user'),
40 'set_by_admin' => $lng->txt(
'set_by_admin'),
41 'disabled' => $lng->txt(
'disabled'),
44 foreach ($types as $type) {
45 $select =
new ilSelectInputGUI($lng->txt(
'notc_' . $type[
'name']),
'notifications[' . $type[
'name'] .
']');
47 $select->setValue($type[
'config_type']);
48 $form->addItem($select);
58 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
63 'set_by_user' => $lng->txt(
'set_by_user'),
64 'set_by_admin' => $lng->txt(
'set_by_admin'),
70 $form->restored_values = array();
71 $store_values = array();
72 foreach ($channels as $channel) {
74 $chb =
new ilCheckboxInputGUI($lng->txt(
'enable_' . $channel[
'name']),
'enable_' . $channel[
'name']);
76 $store_values[] =
'enable_' . $channel[
'name'];
78 $select =
new ilSelectInputGUI($lng->txt(
'config_type'),
'notifications[' . $channel[
'name'] .
']');
80 $select->setValue($channel[
'config_type']);
81 $chb->addSubItem($select);
86 $form->restored_values[
'notifications[' . $channel[
'name'] .
']'] = $channel[
'config_type'];
87 require_once $channel[
'include'];
91 $result = call_user_func(array($channel[
'handler'],
'showSettings'), $chb);
93 $store_values = array_merge(
$result, $store_values);
103 $form->store_values = $store_values;