ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjOrgUnitSettingsFormGUI Class Reference

Class ilObjOrgUnitSettingsFormGUI. More...

+ Inheritance diagram for ilObjOrgUnitSettingsFormGUI:
+ Collaboration diagram for ilObjOrgUnitSettingsFormGUI:

Public Member Functions

 __construct ($parent_gui, ilObjOrgUnit $obj_orgu)
 
 saveObject ()
 Update object. More...
 
- Public Member Functions inherited from ilPropertyFormGUI
 ilPropertyFormGUI ()
 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)
 Add Command button. 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
 ilFormGUI ()
 Constructor. More...
 
 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...
 

Protected Member Functions

 fillObject ()
 Check validity of form and pass values from form to object. More...
 
 updateTranslation ()
 Update title and description for the default language of translation. More...
 
- 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. More...
 
 rebuildUploadedFiles ()
 try to rebuild files More...
 

Protected Attributes

 $obj_orgu
 
 $tpl
 
 $lng
 
 $ctrl
 
 $user
 
 $parent_gui
 
- 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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjOrgUnitSettingsFormGUI::__construct (   $parent_gui,
ilObjOrgUnit  $obj_orgu 
)

Definition at line 42 of file class.ilObjOrgUnitSettingsFormGUI.php.

References $ilCtrl, $ilUser, $lng, $obj_orgu, $parent_gui, and $tpl.

42  {
43  global $tpl, $ilCtrl, $lng, $ilUser;
44  $this->parent_gui = $parent_gui;
45  $this->obj_orgu = $obj_orgu;
46  $this->tpl = $tpl;
47  $this->ctrl = $ilCtrl;
48  $this->lng = $lng;
49  $this->user = $ilUser;
50  $this->initForm();
51  }
global $ilCtrl
Definition: ilias.php:18
global $ilUser
Definition: imgupload.php:15

Member Function Documentation

◆ fillObject()

ilObjOrgUnitSettingsFormGUI::fillObject ( )
protected

Check validity of form and pass values from form to object.

Returns
bool

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

References ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getInput(), and ilPropertyFormGUI\setValuesByPost().

Referenced by saveObject().

115  {
116  $this->setValuesByPost();
117  if (!$this->checkInput()) {
118  return false;
119  }
120  $this->obj_orgu->setOrgUnitTypeId($this->getInput('orgu_type'));
121  $this->obj_orgu->setImportId($this->getInput('ext_id'));
122  $this->obj_orgu->setTitle($this->getInput('title'));
123  $this->obj_orgu->setDescription($this->getInput('description'));
124  return true;
125  }
checkInput()
Check Post Input.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
setValuesByPost()
Set form values from POST values.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveObject()

ilObjOrgUnitSettingsFormGUI::saveObject ( )

Update object.

Returns
bool

Definition at line 59 of file class.ilObjOrgUnitSettingsFormGUI.php.

References $options, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), fillObject(), ilOrgUnitType\getAllTypes(), ilFormGUI\setFormAction(), ilSelectInputGUI\setOptions(), ilFormPropertyGUI\setRequired(), ilPropertyFormGUI\setTitle(), ilTextInputGUI\setValue(), ilTextAreaInputGUI\setValue(), and updateTranslation().

59  {
60  if (!$this->fillObject()) {
61  return false;
62  }
63  $this->obj_orgu->update();
64  $this->updateTranslation();
65  return true;
66  }
fillObject()
Check validity of form and pass values from form to object.
updateTranslation()
Update title and description for the default language of translation.
+ Here is the call graph for this function:

◆ updateTranslation()

ilObjOrgUnitSettingsFormGUI::updateTranslation ( )
protected

Update title and description for the default language of translation.

Definition at line 130 of file class.ilObjOrgUnitSettingsFormGUI.php.

References ilPropertyFormGUI\getInput().

Referenced by saveObject().

130  {
131  $translations = $this->obj_orgu->getTranslations();
132  $lang_code_default = '';
133  $lang_codes = array();
134  foreach ($translations['Fobject'] as $translation) {
135  if ($translation['lang_default']) {
136  $lang_code_default = $translation['lang'];
137  }
138  $lang_codes[] = $translation['lang'];
139  }
140  $lang_code = (in_array($this->user->getLanguage(), $lang_codes)) ? $this->user->getLanguage() : $lang_code_default;
141  $this->obj_orgu->updateTranslation($this->getInput('title'), $this->getInput('description'), $lang_code, 0);
142  }
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

ilObjOrgUnitSettingsFormGUI::$ctrl
protected

Definition at line 29 of file class.ilObjOrgUnitSettingsFormGUI.php.

◆ $lng

ilObjOrgUnitSettingsFormGUI::$lng
protected

Definition at line 24 of file class.ilObjOrgUnitSettingsFormGUI.php.

Referenced by __construct().

◆ $obj_orgu

ilObjOrgUnitSettingsFormGUI::$obj_orgu
protected

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

Referenced by __construct().

◆ $parent_gui

ilObjOrgUnitSettingsFormGUI::$parent_gui
protected

Definition at line 39 of file class.ilObjOrgUnitSettingsFormGUI.php.

Referenced by __construct().

◆ $tpl

ilObjOrgUnitSettingsFormGUI::$tpl
protected

Definition at line 19 of file class.ilObjOrgUnitSettingsFormGUI.php.

Referenced by __construct().

◆ $user

ilObjOrgUnitSettingsFormGUI::$user
protected

Definition at line 34 of file class.ilObjOrgUnitSettingsFormGUI.php.


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