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

Static Public Member Functions

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

Protected Member Functions

 initForm ()
 
 addCommandButtons ()
 
- Protected Member Functions inherited from ilPropertyFormGUI
 hideRequired ($a_type)
 
 rebuildUploadedFiles ()
 try to rebuild files More...
 

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
 
 $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

◆ __construct()

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().

27  {
28  global $ilCtrl, $lng;
29  $this->parent_gui = $parent_gui;
30  $this->ctrl = $ilCtrl;
31  $this->lng = $lng;
32  $this->ctrl->saveParameter($parent_gui, 'clip_ext_id');
33  $this->setFormAction($this->ctrl->getFormAction($parent_gui));
34  $this->initForm();
35  }
setFormAction($a_formaction)
Set FormAction.
global $ilCtrl
Definition: ilias.php:18
global $lng
Definition: privfeed.php:17
+ Here is the call graph for this function:

Member Function Documentation

◆ addCommandButtons()

arConfigFormGUI::addCommandButtons ( )
protected

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

References ilPropertyFormGUI\addCommandButton().

Referenced by initForm().

142  {
143  $this->addCommandButton('save', $this->lng->txt('admin_form_button_save'));
144  $this->addCommandButton('cancel', $this->lng->txt('admin_form_button_cancel'));
145  }
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ checkForSubItem()

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

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

137  {
138  return !$item instanceof ilMultiSelectInputGUI;
139  }
This class represents a multi selection list property in a property form.

◆ checkItem()

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

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

127  {
128  return !$item instanceof ilFormSectionHeaderGUI AND !$item instanceof ilMultiSelectInputGUI;
129  }
This class represents a section header in a property form.
This class represents a multi selection list property in a property form.

◆ fillForm()

arConfigFormGUI::fillForm ( )

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

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

49  {
50  $array = array();
51  foreach ($this->getItems() as $item) {
52  $this->getValuesForItem($item, $array);
53  }
54  $this->setValuesByArray($array);
55  }
Create styles array
The data for the language used.
setValuesByArray($a_values, $a_restrict_to_value_keys=false)
Set form values from an array.
getValuesForItem($item, &$array)
+ Here is the call graph for this function:

◆ fillObject()

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().

82  {
83  if (!$this->checkInput()) {
84  return false;
85  }
86 
87  return true;
88  }
checkInput()
Check Post Input.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getValuesForItem()

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

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

References ActiveRecord\get().

Referenced by fillForm().

64  {
65  if (self::checkItem($item)) {
66  $key = $item->getPostVar();
67  $array[$key] = json_decode(arConfig::get($key));
68  if (self::checkForSubItem($item)) {
69  foreach ($item->getSubItems() as $subitem) {
70  $this->getValuesForItem($subitem, $array);
71  }
72  }
73  }
74  }
getValuesForItem($item, &$array)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initForm()

arConfigFormGUI::initForm ( )
protected

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

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

Referenced by __construct().

38  {
39  $this->setTitle($this->lng->txt('admin_form_title'));
40 
41  $te = new ilTextInputGUI($this->lng->txt('admin_origins_path'), 'path');
42  $te->setInfo($this->lng->txt('admin_origins_path_info'));
43  $this->addItem($te);
44 
45  $this->addCommandButtons();
46  }
addItem($a_item)
Add Item (Property, SectionHeader).
setInfo($a_info)
Set Information Text.
setTitle($a_title)
Set Title.
This class represents a text property in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveObject()

arConfigFormGUI::saveObject ( )
Returns
bool

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

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

94  {
95  if (!$this->fillObject()) {
96  return false;
97  }
98  foreach ($this->getItems() as $item) {
99  $this->saveValueForItem($item);
100  }
101 
102  return true;
103  }
fillObject()
returns whether checkinput was successful or not.
+ Here is the call graph for this function:

◆ saveValueForItem()

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

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

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

Referenced by saveObject().

109  {
110  if (self::checkItem($item)) {
111  $key = $item->getPostVar();
112  arConfig::set($key, json_encode($this->getInput($key)));
113  if (self::checkForSubItem($item)) {
114  foreach ($item->getSubItems() as $subitem) {
115  $this->saveValueForItem($subitem);
116  }
117  }
118  }
119  }
static set($name, $value)
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

arConfigFormGUI::$ctrl
protected

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

◆ $parent_gui

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: