ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
arConfigFormGUI Class Reference

GUI-Class arConfigFormGUI. More...

+ Inheritance diagram for arConfigFormGUI:
+ Collaboration diagram for arConfigFormGUI:

Public Member Functions

 __construct ($parent_gui)
 fillForm ()
 fillObject ()
 returns whether checkinput was successful or not.
 saveObject ()
- Public Member Functions inherited from ilPropertyFormGUI
 ilPropertyFormGUI ()
 Constructor.
executeCommand ()
 Execute command.
 setTableWidth ($a_width)
 Set table width.
 getTableWidth ()
 get table width
 setMode ($a_mode)
 Set Mode ('std', 'subform').
 getMode ()
 Get Mode ('std', 'subform').
 setTitle ($a_title)
 Set Title.
 getTitle ()
 Get Title.
 setTitleIcon ($a_titleicon)
 Set TitleIcon.
 getTitleIcon ()
 Get TitleIcon.
 setDescription ($a_val)
 Set description.
 getDescription ()
 Get description.
 setTopAnchor ($a_val)
 Set top anchor.
 getTopAnchor ()
 Get top anchor.
 setShowTopButtons ($a_val)
 Get show top buttons.
 getShowTopButtons ()
 Set show top buttons.
 addItem ($a_item)
 Add Item (Property, SectionHeader).
 removeItemByPostVar ($a_post_var)
 Remove Item.
 getItemByPostVar ($a_post_var)
 Get Item by POST variable.
 setItems ($a_items)
 Set Items.
 getItems ()
 Get Items.
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively
 setDisableStandardMessage ($a_val)
 Set disable standard message.
 getDisableStandardMessage ()
 Get disable standard message.
 getHideLabels ()
 Get a value indicating whether the labels should be hidden or not.
 setHideLabels ($a_value=true)
 Set a value indicating whether the labels should be hidden or not.
 setValuesByArray ($a_values, $a_restrict_to_value_keys=false)
 Set form values from an array.
 setValuesByPost ()
 Set form values from POST values.
 checkInput ()
 Check Post Input.
 getInput ($a_post_var, $ensureValidation=true)
 Returns the value of a HTTP-POST variable, identified by the passed id.
 addCustomProperty ($a_title, $a_html, $a_info="", $a_alert="", $a_required=false)
 Add a custom property.
 addCommandButton ($a_cmd, $a_text)
 Add Command button.
 clearCommandButtons ()
 Remove all command buttons.
 getContent ()
 Get Content.
 insertItem ($item, $a_sub_item=false)
 getHTML ()
 Get HTML.
 getFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Get file upload data.
 hasFileUpload ($a_field, $a_index=null, $a_sub_index=null)
 Was any file uploaded?
 moveFileUpload ($a_target_directory, $a_field, $a_target_name=null, $a_index=null, $a_sub_index=null)
 Move upload to target directory.
- Public Member Functions inherited from ilFormGUI
 ilFormGUI ()
 Constructor.
 setFormAction ($a_formaction)
 Set FormAction.
 getFormAction ()
 Get FormAction.
 setTarget ($a_target)
 Set Target.
 getTarget ()
 Get Target.
 setMultipart ($a_multipart)
 Set Enctype Multipart/Formdata true/false.
 getMultipart ()
 Get Enctype Multipart/Formdata true/false.
 setId ($a_id)
 Set Id.
 getId ()
 Get Id.
 setName ($a_name)
 Set Name.
 getName ()
 Get Name.
 setKeepOpen ($a_keepopen)
 Set Keep Form Tag Open.
 getKeepOpen ()
 Get Keep Form Tag Open.
 setOpenTag ($a_open)
 Enable/Disable Open Form Tag.
 getOpenTag ()
 Get Open Form Tag Enabled.
 setCloseTag ($a_val)
 Set close tag.
 getCloseTag ()
 Get close tag.
 setPreventDoubleSubmission ($a_val)
 Set prevent double submission.
 getPreventDoubleSubmission ()
 Get prevent double submission.

Static Public Member Functions

static checkItem (ilPropertyFormGUI $item)
static checkForSubItem (ilPropertyFormGUI $item)

Protected Member Functions

 initForm ()
 addCommandButtons ()
- Protected Member Functions inherited from ilPropertyFormGUI
 keepFileUpload ($a_hash, $a_field, $a_tmp_name, $a_name, $a_type, $a_index=null, $a_sub_index=null)
 Import upload into temp directory.
 rebuildUploadedFiles ()
 try to rebuild files

Protected Attributes

 $parent_gui
 $ctrl
- Protected Attributes inherited from ilPropertyFormGUI
 $mode = "std"
 $check_input_called = false
 $disable_standard_message = false
 $top_anchor = "il_form_top"
 $titleicon = false
 $description = ""
 $tbl_width = false
 $show_top_buttons = true
 $reloaded_files
 $hide_labels = false
- Protected Attributes inherited from ilFormGUI
 $formaction
 $multipart = false
 $keepopen = false
 $opentag = true
 $id
 $name
 $prevent_double_submission = false

Private Member Functions

 getValuesForItem ($item, &$array)
 saveValueForItem ($item)

Detailed Description

GUI-Class arConfigFormGUI.

Author
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Version
2.0.7

Definition at line 12 of file class.arConfigFormGUI.php.

Constructor & Destructor Documentation

arConfigFormGUI::__construct (   $parent_gui)
Parameters
$parent_gui

Definition at line 27 of file class.arConfigFormGUI.php.

References $ilCtrl, $lng, $parent_gui, initForm(), and ilFormGUI\setFormAction().

{
global $ilCtrl, $lng;
$this->parent_gui = $parent_gui;
$this->ctrl = $ilCtrl;
$this->lng = $lng;
$this->ctrl->saveParameter($parent_gui, 'clip_ext_id');
$this->setFormAction($this->ctrl->getFormAction($parent_gui));
$this->initForm();
}

+ Here is the call graph for this function:

Member Function Documentation

arConfigFormGUI::addCommandButtons ( )
protected

Definition at line 142 of file class.arConfigFormGUI.php.

References ilPropertyFormGUI\addCommandButton().

Referenced by initForm().

{
$this->addCommandButton('save', $this->lng->txt('admin_form_button_save'));
$this->addCommandButton('cancel', $this->lng->txt('admin_form_button_cancel'));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

static arConfigFormGUI::checkForSubItem ( ilPropertyFormGUI  $item)
static
Parameters
ilPropertyFormGUI$item
Returns
bool

Definition at line 137 of file class.arConfigFormGUI.php.

{
return !$item instanceof ilMultiSelectInputGUI;
}
static arConfigFormGUI::checkItem ( ilPropertyFormGUI  $item)
static
Parameters
ilPropertyFormGUI$item
Returns
bool

Definition at line 127 of file class.arConfigFormGUI.php.

{
return !$item instanceof ilFormSectionHeaderGUI AND !$item instanceof ilMultiSelectInputGUI;
}
arConfigFormGUI::fillForm ( )

Definition at line 49 of file class.arConfigFormGUI.php.

References ilPropertyFormGUI\getItems(), getValuesForItem(), and ilPropertyFormGUI\setValuesByArray().

{
$array = array();
foreach ($this->getItems() as $item) {
$this->getValuesForItem($item, $array);
}
$this->setValuesByArray($array);
}

+ Here is the call graph for this function:

arConfigFormGUI::fillObject ( )

returns whether checkinput was successful or not.

Returns
bool

Definition at line 82 of file class.arConfigFormGUI.php.

References ilPropertyFormGUI\checkInput().

Referenced by saveObject().

{
if (!$this->checkInput()) {
return false;
}
return true;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arConfigFormGUI::getValuesForItem (   $item,
$array 
)
private
Parameters
$item
$array

Definition at line 64 of file class.arConfigFormGUI.php.

References ActiveRecord\get().

Referenced by fillForm().

{
if (self::checkItem($item)) {
$key = $item->getPostVar();
$array[$key] = json_decode(arConfig::get($key));
if (self::checkForSubItem($item)) {
foreach ($item->getSubItems() as $subitem) {
$this->getValuesForItem($subitem, $array);
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arConfigFormGUI::initForm ( )
protected

Definition at line 38 of file class.arConfigFormGUI.php.

References addCommandButtons(), ilPropertyFormGUI\addItem(), ilFormPropertyGUI\setInfo(), and ilPropertyFormGUI\setTitle().

Referenced by __construct().

{
$this->setTitle($this->lng->txt('admin_form_title'));
$te = new ilTextInputGUI($this->lng->txt('admin_origins_path'), 'path');
$te->setInfo($this->lng->txt('admin_origins_path_info'));
$this->addItem($te);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

arConfigFormGUI::saveObject ( )
Returns
bool

Definition at line 94 of file class.arConfigFormGUI.php.

References fillObject(), ilPropertyFormGUI\getItems(), and saveValueForItem().

{
if (!$this->fillObject()) {
return false;
}
foreach ($this->getItems() as $item) {
$this->saveValueForItem($item);
}
return true;
}

+ Here is the call graph for this function:

arConfigFormGUI::saveValueForItem (   $item)
private
Parameters
$item

Definition at line 109 of file class.arConfigFormGUI.php.

References ilPropertyFormGUI\getInput(), and arConfig\set().

Referenced by saveObject().

{
if (self::checkItem($item)) {
$key = $item->getPostVar();
arConfig::set($key, json_encode($this->getInput($key)));
if (self::checkForSubItem($item)) {
foreach ($item->getSubItems() as $subitem) {
$this->saveValueForItem($subitem);
}
}
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Field Documentation

arConfigFormGUI::$ctrl
protected

Definition at line 21 of file class.arConfigFormGUI.php.

arConfigFormGUI::$parent_gui
protected

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

Referenced by __construct().


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