ILIAS  release_4-3 Revision
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilFMSettingsGUI Class Reference

File manager settings. More...

+ Collaboration diagram for ilFMSettingsGUI:

Public Member Functions

 __construct ($a_parent_gui)
 Constructor.
 executeCommand ()
 Execute command ilCtrl $ilCtrl.
 getParentObject ()
 Get parent gui.

Protected Member Functions

 settings ()
 Show settings.
 update ()
 Update.
 initSettingsForm ()
 Init settings form.

Private Attributes

 $parent_obj = null

Detailed Description

File manager settings.

Author
Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e $Id$

ilFMSettingsGUI:

Definition at line 14 of file class.ilFMSettingsGUI.php.

Constructor & Destructor Documentation

ilFMSettingsGUI::__construct (   $a_parent_gui)

Constructor.

Definition at line 22 of file class.ilFMSettingsGUI.php.

{
$this->parent_obj = $a_parent_gui;
}

Member Function Documentation

ilFMSettingsGUI::executeCommand ( )

Execute command ilCtrl $ilCtrl.

Definition at line 31 of file class.ilFMSettingsGUI.php.

References $cmd, and $ilCtrl.

{
global $ilCtrl;
$next_class = $ilCtrl->getNextClass();
$cmd = $ilCtrl->getCmd();
switch($next_class)
{
default:
if(!$cmd)
{
$cmd = 'settings';
}
$this->$cmd();
break;
}
}
ilFMSettingsGUI::getParentObject ( )

Get parent gui.

Returns
ilObjectGUI

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

References $parent_obj.

{
}
ilFMSettingsGUI::initSettingsForm ( )
protected

Init settings form.

Definition at line 93 of file class.ilFMSettingsGUI.php.

References $GLOBALS, $ilCtrl, and ilFMSettings\getInstance().

Referenced by settings(), and update().

{
global $ilCtrl;
include_once './Services/Form/classes/class.ilPropertyFormGUI.php';
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($GLOBALS['lng']->txt('settings'));
$form->addCommandButton('update', $GLOBALS['lng']->txt('save'));
$form->addCommandButton('settings', $GLOBALS['lng']->txt('cancel'));
// activation
$active = new ilCheckboxInputGUI($GLOBALS['lng']->txt('fm_settings_active'), 'active');
$active->setInfo($GLOBALS['lng']->txt('fm_settings_active_info'));
$active->setValue(1);
$active->setChecked(ilFMSettings::getInstance()->isEnabled());
$form->addItem($active);
// one frame
$local = new ilCheckboxInputGUI($GLOBALS['lng']->txt('fm_settings_local'), 'local');
$local->setInfo($GLOBALS['lng']->txt('fm_settings_local_info'));
$local->setValue(1);
$local->setChecked(ilFMSettings::getInstance()->IsLocalFSEnabled());
$form->addItem($local);
$fs = new ilNumberInputGUI($GLOBALS['lng']->txt('fm_settings_filesize'),'filesize');
$fs->setSuffix('MiB');
$fs->setSize(3);
$fs->setMaxLength(3);
$fs->setMinValue(1);
$fs->setMaxValue(999);
$fs->setInfo($GLOBALS['lng']->txt('fm_settings_filesize_info'));
$fs->setValue(ilFMSettings::getInstance()->getMaxFileSize());
$form->addItem($fs);
return $form;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilFMSettingsGUI::settings ( )
protected

Show settings.

Definition at line 62 of file class.ilFMSettingsGUI.php.

References $GLOBALS, and initSettingsForm().

{
$form = $this->initSettingsForm();
$GLOBALS['tpl']->setContent($form->getHTML());
}

+ Here is the call graph for this function:

ilFMSettingsGUI::update ( )
protected

Update.

Definition at line 72 of file class.ilFMSettingsGUI.php.

References $GLOBALS, ilFMSettings\getInstance(), initSettingsForm(), and ilUtil\sendSuccess().

{
include_once './Services/WebServices/FileManager/classes/class.ilFMSettings.php';
$form = $this->initSettingsForm();
if($form->checkInput())
{
$settings->enable($form->getInput('active'));
$settings->enableLocalFS($form->getInput('local'));
$settings->setMaxFileSize($form->getInput('filesize'));
$settings->update();
ilUtil::sendSuccess($GLOBALS['lng']->txt('settings_saved'), true);
$GLOBALS['ilCtrl']->redirect($this,'settings');
}
}

+ Here is the call graph for this function:

Field Documentation

ilFMSettingsGUI::$parent_obj = null
private

Definition at line 17 of file class.ilFMSettingsGUI.php.

Referenced by getParentObject().


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