3 require_once
'Services/Form/classes/class.ilPropertyFormGUI.php';
14 $lng = $DIC->language();
16 $lng->loadLanguageModule(
'notification');
21 'set_by_user' =>
$lng->txt(
'set_by_user'),
22 'set_by_admin' =>
$lng->txt(
'set_by_admin'),
23 'disabled' =>
$lng->txt(
'disabled'),
26 foreach ($types as
$type) {
27 $select =
new ilSelectInputGUI(
$lng->txt(
'nott_' . $type[
'name']),
'notifications[' . $type[
'name'] .
']');
28 $select->setOptions($options);
29 $select->setValue($type[
'config_type']);
30 $form->addItem($select);
39 $lng = $DIC->language();
44 'set_by_user' =>
$lng->txt(
'set_by_user'),
45 'set_by_admin' =>
$lng->txt(
'set_by_admin'),
46 'disabled' =>
$lng->txt(
'disabled'),
49 foreach ($types as
$type) {
50 $select =
new ilSelectInputGUI(
$lng->txt(
'notc_' . $type[
'name']),
'notifications[' . $type[
'name'] .
']');
51 $select->setOptions($options);
52 $select->setValue($type[
'config_type']);
53 $form->addItem($select);
62 $lng = $DIC->language();
66 require_once
'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
71 'set_by_user' =>
$lng->txt(
'set_by_user'),
72 'set_by_admin' =>
$lng->txt(
'set_by_admin'),
78 $form->restored_values = array();
79 $store_values = array();
80 foreach ($channels as $channel) {
82 if (
$lng->txt(
'enable_' . $channel[
'name'] .
'_info') !=
'-enable_' . $channel[
'name'] .
'_info-') {
83 $chb->
setInfo(
$lng->txt(
'enable_' . $channel[
'name'] .
'_info'));
86 $store_values[] =
'enable_' . $channel[
'name'];
89 foreach ($options as $key => $translation) {
91 $mode->addOption($option);
93 $mode->setValue($channel[
'config_type']);
94 $chb->addSubItem($mode);
99 $form->restored_values[
'notifications[' . $channel[
'name'] .
']'] = $channel[
'config_type'];
100 require_once $channel[
'include'];
104 $inst =
new $channel[
'handler']();
105 $result = $inst->{
'showSettings'}($chb);
107 $store_values = array_merge(
$result, $store_values);
111 $form->addItem($chb);
117 $form->store_values = $store_values;
This class represents an option in a radio group.
static getAvailableChannels($config_types=array(), $includeDisabled=false)