ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilBiblLibraryFormGUI Class Reference

Bibliographic Libraries Form. More...

+ Inheritance diagram for ilBiblLibraryFormGUI:
+ Collaboration diagram for ilBiblLibraryFormGUI:

Public Member Functions

 __construct (ilBiblLibraryInterface $library)
 ilBiblLibraryFormGUI constructor. 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, $a_remove_unused_headers=false)
 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...
 

Protected Attributes

 $object
 
- Protected Attributes inherited from ilPropertyFormGUI
 $lng
 
 $ctrl
 
 $tpl
 
 $user
 
 $settings
 
 $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

 initForm ()
 Init settings property form. More...
 
 fillForm ()
 

Additional Inherited Members

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

Detailed Description

Bibliographic Libraries Form.

Author
Theodor Truffer
Martin Studer ms@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 12 of file class.ilBiblLibraryFormGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilBiblLibraryFormGUI::__construct ( ilBiblLibraryInterface  $library)

ilBiblLibraryFormGUI constructor.

Parameters
\ilBiblLibraryInterface$library

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

References ilBiblLibraryGUI\F_LIB_ID, fillForm(), and initForm().

27  {
28  $this->object = $library;
29  $this->ctrl()->saveParameterByClass(ilBiblLibraryGUI::class, ilBiblLibraryGUI::F_LIB_ID);
30  $this->initForm();
31 
32  if ($this->object->getId()) {
33  $this->fillForm();
34  }
35  parent::__construct();
36  }
initForm()
Init settings property form.
+ Here is the call graph for this function:

Member Function Documentation

◆ fillForm()

ilBiblLibraryFormGUI::fillForm ( )
private

Definition at line 74 of file class.ilBiblLibraryFormGUI.php.

References ilPropertyFormGUI\setValuesByArray().

Referenced by __construct(), and initForm().

75  {
76  $this->setValuesByArray(array(
77  'name' => $this->object->getName(),
78  'url' => $this->object->getUrl(),
79  'img' => $this->object->getImg(),
80  'show_in_list' => $this->object->getShowInList(),
81  ));
82  }
setValuesByArray($a_values, $a_restrict_to_value_keys=false)
Set form values from an array.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initForm()

ilBiblLibraryFormGUI::initForm ( )
private

Init settings property form.

private

Definition at line 44 of file class.ilBiblLibraryFormGUI.php.

References $img, ilFormGUI\$name, $url, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), fillForm(), ilFormGUI\setFormAction(), and ilPropertyFormGUI\setTitle().

Referenced by __construct().

45  {
46  $this->setFormAction($this->ctrl()->getFormActionByClass(ilBiblLibraryGUI::class));
47  $name = new ilTextInputGUI($this->lng()->txt("bibl_library_name"), 'name');
48  $name->setRequired(true);
49  $name->setValue('');
50  $this->addItem($name);
51  $url = new ilTextInputGUI($this->lng()->txt("bibl_library_url"), 'url');
52  $url->setRequired(true);
53  $url->setValue('');
54  $this->addItem($url);
55  $img = new ilTextInputGUI($this->lng()->txt("bibl_library_img"), 'img');
56  $img->setValue('');
57  $this->addItem($img);
58  $show_in_list = new ilCheckboxInputGUI($this->lng()
59  ->txt("bibl_library_show_in_list"), 'show_in_list');
60  $show_in_list->setValue(1);
61  $this->addItem($show_in_list);
62  if ($this->object->getId()) {
63  $this->addCommandButton('update', $this->lng()->txt('save'));
64  $this->fillForm();
65  $this->setTitle($this->lng()->txt("bibl_settings_edit"));
66  } else {
67  $this->setTitle($this->lng()->txt("bibl_settings_new"));
68  $this->addCommandButton('create', $this->lng()->txt('save'));
69  }
70  $this->addCommandButton('cancel', $this->lng()->txt("cancel"));
71  }
This class represents a checkbox property in a property form.
setFormAction($a_formaction)
Set FormAction.
addItem($a_item)
Add Item (Property, SectionHeader).
setTitle($a_title)
Set Title.
This class represents a text property in a property form.
addCommandButton($a_cmd, $a_text, $a_id="")
Add Command button.
$url
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveObject()

ilBiblLibraryFormGUI::saveObject ( )

Definition at line 85 of file class.ilBiblLibraryFormGUI.php.

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

86  {
87  if (!$this->checkInput()) {
88  return false;
89  }
90  $this->object->setName($this->getInput("name"));
91  $this->object->setUrl($this->getInput("url"));
92  $this->object->setImg($this->getInput("img"));
93  $this->object->setShowInList((bool) $this->getInput("show_in_list"));
94  $this->object->store();
95 
96  return true;
97  }
checkInput()
Check Post Input.
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:

Field Documentation

◆ $object

ilBiblLibraryFormGUI::$object
protected

Definition at line 18 of file class.ilBiblLibraryFormGUI.php.


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