ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
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

static ilNotificationAdminSettingsForm::getChannelForm (   $types)
static

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

References $lng, $options, and ilSelectInputGUI\setOptions().

Referenced by ilObjNotificationAdminGUI\showChannelsObject().

{
global $lng;
$form = new ilPropertyFormGUI();
$options = array(
'set_by_user' => $lng->txt('set_by_user'),
'set_by_admin' => $lng->txt('set_by_admin'),
'disabled' => $lng->txt('disabled'),
);
foreach ($types as $type) {
$select = new ilSelectInputGUI($lng->txt('notc_' . $type['name']), 'notifications[' . $type['name'] . ']');
$select->setOptions($options);
$select->setValue($type['config_type']);
$form->addItem($select);
}
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

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

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

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

{
global $lng;
$form = new ilPropertyFormGUI();
require_once 'Services/Notifications/classes/class.ilNotificationDatabaseHelper.php';
$options = array(
'set_by_user' => $lng->txt('set_by_user'),
'set_by_admin' => $lng->txt('set_by_admin'),
//'disabled' => $lng->txt('disabled'),
);
$form->restored_values = array();
$store_values = array();
foreach ($channels as $channel) {
$chb = new ilCheckboxInputGUI($lng->txt('enable_' . $channel['name']), 'enable_' . $channel['name']);
$store_values[] = 'enable_' . $channel['name'];
$select = new ilSelectInputGUI($lng->txt('config_type'), 'notifications[' . $channel['name'] . ']');
$select->setOptions($options);
$select->setValue($channel['config_type']);
$chb->addSubItem($select);
$form->restored_values['notifications[' . $channel['name'] . ']'] = $channel['config_type'];
require_once $channel['include'];
// let the channel display their own settings below the "enable channel"
// checkbox
$result = call_user_func(array($channel['handler'], 'showSettings'), $chb);
if ($result) {
$store_values = array_merge($result, $store_values);
}
$form->addItem($chb);
}
$form->store_values = $store_values;
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static ilNotificationAdminSettingsForm::getTypeForm (   $types)
static

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

References $lng, $options, and ilSelectInputGUI\setOptions().

Referenced by ilObjNotificationAdminGUI\showTypesObject().

{
global $lng;
$lng->loadLanguageModule('notification');
$form = new ilPropertyFormGUI();
$options = array(
'set_by_user' => $lng->txt('set_by_user'),
'set_by_admin' => $lng->txt('set_by_admin'),
'disabled' => $lng->txt('disabled'),
);
foreach ($types as $type) {
$select = new ilSelectInputGUI($lng->txt('nott_' . $type['name']), 'notifications[' . $type['name'] . ']');
$select->setOptions($options);
$select->setValue($type['config_type']);
$form->addItem($select);
}
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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