ILIAS  release_8 Revision v8.23
ilOrgUnitPositionFormGUI Class Reference

Class ilOrgUnitPositionFormGUI. More...

+ Inheritance diagram for ilOrgUnitPositionFormGUI:
+ Collaboration diagram for ilOrgUnitPositionFormGUI:

Public Member Functions

 fillForm ()
 
- Public Member Functions inherited from ILIAS\Modules\OrgUnit\ARHelper\BaseForm
 __construct (BaseCommands $parent_gui, \ActiveRecord $object)
 
 fillForm ()
 
 saveObject ()
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 
 executeCommand ()
 
 setTableWidth (string $a_width)
 
 getTableWidth ()
 
 setMode (string $a_mode)
 
 getMode ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setTitleIcon (string $a_titleicon)
 
 getTitleIcon ()
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setShowTopButtons (bool $a_val)
 
 getShowTopButtons ()
 
 setForceTopButtons (bool $a_val)
 
 getForceTopButtons ()
 
 addItem ($a_item)
 
 removeItemByPostVar (string $a_post_var, bool $a_remove_unused_headers=false)
 
 getItemByPostVar (string $a_post_var)
 
 setItems (array $a_items)
 
 getItems ()
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage (bool $a_val)
 
 getDisableStandardMessage ()
 
 getHideLabels ()
 
 setHideLabels (bool $a_value=true)
 
 setValuesByArray (array $a_values, bool $a_restrict_to_value_keys=false)
 
 setValuesByPost ()
 
 checkInput ()
 
 getInput (string $a_post_var, bool $ensureValidation=true)
 Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-POST variable, identified by the passed postvar. More...
 
 addCommandButton (string $a_cmd, string $a_text, string $a_id="")
 
 getCommandButtons ()
 
 clearCommandButtons ()
 
 getContent ()
 
 insertItem ( $item, bool $a_sub_item=false)
 
 addAsyncOnloadCode (string $code)
 
 getHTML ()
 
 getHTMLAsync ()
 
 getFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 
 moveFileUpload (string $a_target_directory, string $a_field, ?string $a_target_name=null, ?string $a_index=null, ?string $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

Data Fields

const F_AUTHORITIES = "authorities"
 
const F_TITLE = 'title'
 
const F_DESCRIPTION = 'description'
 

Protected Member Functions

 initFormElements ()
 
- Protected Member Functions inherited from ILIAS\Modules\OrgUnit\ARHelper\BaseForm
 initFormElements ()
 
 fillObject ()
 
- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 

Protected Attributes

ActiveRecord $object
 
- Protected Attributes inherited from ILIAS\Modules\OrgUnit\ARHelper\BaseForm
BaseCommands $parent_gui
 
ILIAS DI Container $DIC
 
ActiveRecord $object
 
ilLanguage $lng
 
ilCtrl $ctrl
 
- Protected Attributes inherited from ilPropertyFormGUI
bool $required_text = false
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTemplate $tpl
 
ilObjUser $user = null
 
ilSetting $settings = null
 
string $mode = "std"
 
bool $check_input_called = false
 
bool $disable_standard_message = false
 
string $top_anchor = "il_form_top"
 
string $title = ''
 
string $titleicon = ""
 
string $description = ""
 
string $tbl_width = ""
 
bool $show_top_buttons = true
 
bool $hide_labels = false
 
bool $force_top_buttons = false
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
ilGlobalTemplateInterface $global_tpl = null
 
 $onload_code = []
 
- Protected Attributes inherited from ilFormGUI
string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Detailed Description

Member Function Documentation

◆ fillForm()

ilOrgUnitPositionFormGUI::fillForm ( )

Definition at line 73 of file class.ilOrgUnitPositionFormGUI.php.

References ilFormGUI\$id, ilPropertyFormGUI\checkInput(), ILIAS\Modules\OrgUnit\ARHelper\BaseForm\fillObject(), ActiveRecord\findOrGetInstance(), ilPropertyFormGUI\getInput(), ILIAS\Repository\object(), and ilPropertyFormGUI\setValuesByArray().

73  : void
74  {
75  $this->object->afterObjectLoad();
76  $array = array(
77  self::F_TITLE => $this->object->getTitle(),
78  self::F_DESCRIPTION => $this->object->getDescription(),
79  self::F_AUTHORITIES => $this->object->getAuthoritiesAsArray()
80  );
81  $this->setValuesByArray($array);
82  }
setValuesByArray(array $a_values, bool $a_restrict_to_value_keys=false)
+ Here is the call graph for this function:

◆ initFormElements()

ilOrgUnitPositionFormGUI::initFormElements ( )
protected

Definition at line 32 of file class.ilOrgUnitPositionFormGUI.php.

References ILIAS\Modules\OrgUnit\ARHelper\BaseForm\$DIC, ilFormGUI\$id, ILIAS\Modules\OrgUnit\ARHelper\BaseForm\$lng, $scope, $scopes, $txt, ilPropertyFormGUI\addItem(), ActiveRecord\getArray(), ilOrgUnitAuthority\getScopes(), ilOrgUnitGenericMultiInputGUI\MULTI_FIELD_ID, ilOrgUnitGenericMultiInputGUI\MULTI_FIELD_OVER, ilOrgUnitGenericMultiInputGUI\MULTI_FIELD_SCOPE, ilOrgUnitAuthority\OVER_EVERYONE, ilOrgUnitGenericMultiInputGUI\setShowLabel(), and ilLanguage\txt().

32  : void
33  {
34  global $DIC;
35  $lng = $DIC->language();
36 
37  $te = new ilTextInputGUI($lng->txt(self::F_TITLE), self::F_TITLE);
38  $te->setRequired(true);
39  $this->addItem($te);
40 
41  $te = new ilTextAreaInputGUI($lng->txt(self::F_DESCRIPTION), self::F_DESCRIPTION);
42  $this->addItem($te);
43 
44  $m = new ilOrgUnitGenericMultiInputGUI($lng->txt(self::F_AUTHORITIES), self::F_AUTHORITIES);
45  $m->setShowLabel(true);
46  $m->setRenderOneForEmptyValue(false);
47  $m->setMulti(true);
48 
50  $m->addInput($id);
51 
53  $over_options = [];
54  $over_options[ilOrgUnitAuthority::OVER_EVERYONE] = $lng->txt('over_'
56  $over_options += ilOrgUnitPosition::getArray('id', 'title');
57  $over->setOptions($over_options);
58  $m->addInput($over);
59 
60  $available_scopes = [];
61  foreach (ilOrgUnitAuthority::getScopes() as $scope) {
62  $txt = $lng->txt('scope_' . $scope);
63  $available_scopes[$scope] = $txt;
64  }
65 
67  $scopes->setOptions($available_scopes);
68  $m->addInput($scopes);
69 
70  $this->addItem($m);
71  }
$scope
Definition: ltiregstart.php:53
static getArray(?string $key=null, $values=null)
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
$scopes
Definition: ltitoken.php:99
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$txt
Definition: error.php:13
This class represents a text area property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Field Documentation

◆ $object

ActiveRecord ilOrgUnitPositionFormGUI::$object
protected

Definition at line 28 of file class.ilOrgUnitPositionFormGUI.php.

◆ F_AUTHORITIES

const ilOrgUnitPositionFormGUI::F_AUTHORITIES = "authorities"

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

◆ F_DESCRIPTION

const ilOrgUnitPositionFormGUI::F_DESCRIPTION = 'description'

Definition at line 30 of file class.ilOrgUnitPositionFormGUI.php.

◆ F_TITLE

const ilOrgUnitPositionFormGUI::F_TITLE = 'title'

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


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