ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilCloudPluginConfigGUI Class Reference

Class ilCloudPluginConfigGUI. More...

+ Inheritance diagram for ilCloudPluginConfigGUI:
+ Collaboration diagram for ilCloudPluginConfigGUI:

Public Member Functions

 getFields ()
 getTableName ()
 getObject ()
 performCommand ($cmd)
 Handles all commmands, default is "configure".
 configure ()
 Configure screen.
 getValues ()
 initConfigurationForm ()
 save ()
- Public Member Functions inherited from ilPluginConfigGUI
 setPluginObject ($a_val)
 Set plugin object.
 getPluginObject ()
 Get plugin object.
 executeCommand ()
 Execute command.

Protected Attributes

 $object
 $fields = array()
- Protected Attributes inherited from ilPluginConfigGUI
 $plugin_object = null

Detailed Description

Class ilCloudPluginConfigGUI.

GUI class for the administration settings. Plugin classes can extend this method and override getFields to declare the fields needed for the input of the settings.

public function getFields() { return array( "app_name" => array("type" => "ilTextInputGUI", "info" => "config_info_app_name", "subelements" => null), ); }

Author
Timon Amstutz timon.nosp@m..ams.nosp@m.tutz@.nosp@m.ilub.nosp@m..unib.nosp@m.e.ch
Version
$Id$

Definition at line 26 of file class.ilCloudPluginConfigGUI.php.

Member Function Documentation

ilCloudPluginConfigGUI::configure ( )

Configure screen.

Definition at line 84 of file class.ilCloudPluginConfigGUI.php.

References $tpl, getValues(), and initConfigurationForm().

{
global $tpl;
$this->getValues();
$tpl->setContent($this->form->getHTML());
}

+ Here is the call graph for this function:

ilCloudPluginConfigGUI::getFields ( )
Returns
array

Definition at line 41 of file class.ilCloudPluginConfigGUI.php.

Referenced by performCommand().

{
return null;
}

+ Here is the caller graph for this function:

ilCloudPluginConfigGUI::getObject ( )
Returns
ilCloudPluginConfig

Definition at line 58 of file class.ilCloudPluginConfigGUI.php.

References $object.

{
return $this->object;
}
ilCloudPluginConfigGUI::getTableName ( )
Returns
string

Definition at line 50 of file class.ilCloudPluginConfigGUI.php.

References ilPluginConfigGUI\getPluginObject().

Referenced by performCommand().

{
return $this->getPluginObject()->getPrefix() . "_config";
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilCloudPluginConfigGUI::getValues ( )

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

References fields.

Referenced by configure().

{
foreach ($this->fields as $key => $item)
{
$values[$key] = $this->object->getValue($key);
if (is_array($item["subelements"]))
{
foreach ($item["subelements"] as $subkey => $subitem)
{
$values[$key . "_" . $subkey] = $this->object->getValue($key . "_" . $subkey);
}
}
}
$this->form->setValuesByArray($values);
}

+ Here is the caller graph for this function:

ilCloudPluginConfigGUI::initConfigurationForm ( )
Returns
ilPropertyFormGUI

Definition at line 115 of file class.ilCloudPluginConfigGUI.php.

References $ilCtrl, $lng, and fields.

Referenced by configure(), and save().

{
global $lng, $ilCtrl;
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
foreach ($this->fields as $key => $item)
{
$field = new $item["type"]($this->plugin_object->txt($key), $key);
$field->setInfo($this->plugin_object->txt($item["info"]));
if (is_array($item["subelements"]))
{
foreach ($item["subelements"] as $subkey => $subitem)
{
$subfield = new $subitem["type"]($this->plugin_object->txt($key . "_" . $subkey), $key . "_" . $subkey);
$subfield->setInfo($this->plugin_object->txt($subitem["info"]));
$field->addSubItem($subfield);
}
}
$this->form->addItem($field);
}
$this->form->addCommandButton("save", $lng->txt("save"));
$this->form->setTitle($this->plugin_object->txt("configuration"));
$this->form->setFormAction($ilCtrl->getFormAction($this));
return $this->form;
}

+ Here is the caller graph for this function:

ilCloudPluginConfigGUI::performCommand (   $cmd)

Handles all commmands, default is "configure".

Reimplemented from ilPluginConfigGUI.

Definition at line 66 of file class.ilCloudPluginConfigGUI.php.

References $cmd, fields, getFields(), and getTableName().

{
include_once("class.ilCloudPluginConfig.php");
$this->object = new ilCloudPluginConfig($this->getTableName());
$this->fields = $this->getFields();
switch ($cmd)
{
case "configure":
case "save":
$this->$cmd();
break;
}
}

+ Here is the call graph for this function:

ilCloudPluginConfigGUI::save ( )

Definition at line 147 of file class.ilCloudPluginConfigGUI.php.

References $ilCtrl, $tpl, fields, and initConfigurationForm().

{
global $tpl, $ilCtrl;
if ($this->form->checkInput())
{
// Save Checkbox Values
foreach ($this->fields as $key => $item)
{
$this->object->setValue($key, $this->form->getInput($key));
if (is_array($item["subelements"]))
{
foreach ($item["subelements"] as $subkey => $subitem)
{
$this->object->setValue($key . "_" . $subkey, $this->form->getInput($key . "_" . $subkey));
}
}
}
$ilCtrl->redirect($this, "configure");
} else
{
$this->form->setValuesByPost();
$tpl->setContent($this->form->getHtml());
}
}

+ Here is the call graph for this function:

Field Documentation

ilCloudPluginConfigGUI::$fields = array()
protected

Definition at line 36 of file class.ilCloudPluginConfigGUI.php.

ilCloudPluginConfigGUI::$object
protected

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

Referenced by getObject().


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