ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilOrgUnitTypeCustomIconsFormGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilOrgUnitTypeCustomIconsFormGUI:
+ Collaboration diagram for ilOrgUnitTypeCustomIconsFormGUI:

Public Member Functions

 __construct (ilOrgUnitTypeGUI $parent_gui, ilOrgUnitType $type)
 
 saveObject ()
 Save object (create or update) More...
 
- 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 ()
 

Protected Attributes

ilOrgUnitTypeGUI $parent_gui
 
ilOrgUnitType $type
 
ilCtrl $ctrl
 
ilLanguage $lng
 
- 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
 

Private Member Functions

 initForm ()
 Add all fields to the form. More...
 

Additional Inherited Members

- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilOrgUnitTypeFormGUI

Author
Stefan Wanzenried sw@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

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

Constructor & Destructor Documentation

◆ __construct()

ilOrgUnitTypeCustomIconsFormGUI::__construct ( ilOrgUnitTypeGUI  $parent_gui,
ilOrgUnitType  $type 
)

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

References $parent_gui, $type, ILIAS\GlobalScreen\Provider\__construct(), initForm(), and ILIAS\Repository\lng().

32  {
34  $this->parent_gui = $parent_gui;
35  $this->type = $type;
36  $this->lng->loadLanguageModule('meta');
37  $this->initForm();
38  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ initForm()

ilOrgUnitTypeCustomIconsFormGUI::initForm ( )
private

Add all fields to the form.

Definition at line 62 of file class.ilOrgUnitTypeCustomIconsFormGUI.php.

References Vendor\Package\$e, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), ilPropertyFormGUI\checkInput(), ILIAS\Repository\ctrl(), ilPropertyFormGUI\getInput(), ilPropertyFormGUI\getItemByPostVar(), ILIAS\Repository\lng(), ilFormGUI\setFormAction(), ilFileInputGUI\setSuffixes(), ilPropertyFormGUI\setTitle(), and ilPropertyFormGUI\setValuesByPost().

Referenced by __construct().

62  : void
63  {
64  $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
65  $this->setTitle($this->lng->txt('orgu_type_custom_icon'));
66  $item = new ilImageFileInputGUI($this->lng->txt('icon') . ' 32x32 px', 'icon');
67  $item->setSuffixes(array('svg'));
68  $item->setInfo($this->lng->txt('orgu_type_custom_icon_info'));
69  if (is_file($this->type->getIconPath(true))) {
70  $item->setImage($this->type->getIconPath(true));
71  }
72  $this->addItem($item);
73  $this->addCommandButton('updateCustomIcons', $this->lng->txt('save'));
74  }
setSuffixes(array $a_suffixes)
setFormAction(string $a_formaction)
addCommandButton(string $a_cmd, string $a_text, string $a_id="")
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:
+ Here is the caller graph for this function:

◆ saveObject()

ilOrgUnitTypeCustomIconsFormGUI::saveObject ( )

Save object (create or update)

Definition at line 43 of file class.ilOrgUnitTypeCustomIconsFormGUI.php.

References Vendor\Package\$e.

43  : bool
44  {
45  if (!$this->fillObject()) {
46  return false;
47  }
48  try {
49  $this->type->save();
50 
51  return true;
52  } catch (ilException $e) {
53  $this->global_tpl->setOnScreenMessage('failure', $e->getMessage());
54 
55  return false;
56  }
57  }

Field Documentation

◆ $ctrl

ilCtrl ilOrgUnitTypeCustomIconsFormGUI::$ctrl
protected

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

◆ $lng

ilLanguage ilOrgUnitTypeCustomIconsFormGUI::$lng
protected

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

◆ $parent_gui

ilOrgUnitTypeGUI ilOrgUnitTypeCustomIconsFormGUI::$parent_gui
protected

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

Referenced by __construct().

◆ $type

ilOrgUnitType ilOrgUnitTypeCustomIconsFormGUI::$type
protected

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

Referenced by __construct().


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