ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ilNotificationAdminSettingsForm Class Reference

Methods for building the administration forms. More...

+ Collaboration diagram for ilNotificationAdminSettingsForm:

Static Public Member Functions

static getTypeForm ($types)
 
static getChannelForm ($types)
 
static getGeneralSettingsForm ()
 

Detailed Description

Methods for building the administration forms.

Definition at line 8 of file class.ilNotificationAdminSettingsForm.php.

Member Function Documentation

◆ getChannelForm()

static ilNotificationAdminSettingsForm::getChannelForm (   $types)
static

Definition at line 34 of file class.ilNotificationAdminSettingsForm.php.

35 {
36 global $lng;
37
39
40 $options = array(
41 'set_by_user' => $lng->txt('set_by_user'),
42 'set_by_admin' => $lng->txt('set_by_admin'),
43 'disabled' => $lng->txt('disabled'),
44 );
45
46 foreach ($types as $type) {
47 $select = new ilSelectInputGUI($lng->txt('notc_' . $type['name']), 'notifications[' . $type['name'] . ']');
48 $select->setOptions($options);
49 $select->setValue($type['config_type']);
50 $form->addItem($select);
51 }
52
53 return $form;
54 }
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
Definition: as_login.php:20
This class represents a property form user interface.
This class represents a selection list property in a property form.
global $lng
Definition: privfeed.php:17
$type
if(isset($_POST['submit'])) $form

References $form, $lng, $options, and $type.

Referenced by ilObjNotificationAdminGUI\showChannelsObject().

+ Here is the caller graph for this function:

◆ getGeneralSettingsForm()

static ilNotificationAdminSettingsForm::getGeneralSettingsForm ( )
static
Todo:
dirty...
Todo:
dirty...
Todo:
dirty...

Definition at line 56 of file class.ilNotificationAdminSettingsForm.php.

57 {
58 global $lng;
60
61 require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
62
64
65 $options = array(
66 'set_by_user' => $lng->txt('set_by_user'),
67 'set_by_admin' => $lng->txt('set_by_admin'),
68 //'disabled' => $lng->txt('disabled'),
69 );
73 $form->restored_values = array();
74 $store_values = array();
75 foreach ($channels as $channel) {
76 $chb = new ilCheckboxInputGUI($lng->txt('enable_' . $channel['name']), 'enable_' . $channel['name']);
77
78 $store_values[] = 'enable_' . $channel['name'];
79
80 $select = new ilSelectInputGUI($lng->txt('config_type'), 'notifications[' . $channel['name'] . ']');
81 $select->setOptions($options);
82 $select->setValue($channel['config_type']);
83 $chb->addSubItem($select);
84
88 $form->restored_values['notifications[' . $channel['name'] . ']'] = $channel['config_type'];
89 require_once $channel['include'];
90
91 // let the channel display their own settings below the "enable channel"
92 // checkbox
93 $result = call_user_func(array($channel['handler'], 'showSettings'), $chb);
94 if ($result) {
95 $store_values = array_merge($result, $store_values);
96 }
97
98
99 $form->addItem($chb);
100 }
101
105 $form->store_values = $store_values;
106
107 return $form;
108 }
$result
This class represents a checkbox property in a property form.
static getAvailableChannels($config_types=array(), $includeDisabled=false)

References $form, $lng, $options, $result, and ilNotificationDatabaseHandler\getAvailableChannels().

Referenced by ilObjNotificationAdminGUI\saveGeneralSettingsObject(), and ilObjNotificationAdminGUI\showGeneralSettingsObject().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getTypeForm()

static ilNotificationAdminSettingsForm::getTypeForm (   $types)
static

Definition at line 10 of file class.ilNotificationAdminSettingsForm.php.

11 {
12 global $lng;
13
14 $lng->loadLanguageModule('notification');
15
17
18 $options = array(
19 'set_by_user' => $lng->txt('set_by_user'),
20 'set_by_admin' => $lng->txt('set_by_admin'),
21 'disabled' => $lng->txt('disabled'),
22 );
23
24 foreach ($types as $type) {
25 $select = new ilSelectInputGUI($lng->txt('nott_' . $type['name']), 'notifications[' . $type['name'] . ']');
26 $select->setOptions($options);
27 $select->setValue($type['config_type']);
28 $form->addItem($select);
29 }
30
31 return $form;
32 }

References $form, $lng, $options, and $type.

Referenced by ilObjNotificationAdminGUI\showTypesObject().

+ Here is the caller graph for this function:

The documentation for this class was generated from the following file: