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

Bibliographic Settings Form. More...

+ Inheritance diagram for ilObjBibliographicAdminLibrariesFormGUI:
+ Collaboration diagram for ilObjBibliographicAdminLibrariesFormGUI:

Public Member Functions

 __construct ($parent_gui, $bibl_setting)
 Constructor. More...
 
 saveObject ()
 
- 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 Attributes

 $bibl_setting
 
 $parent_gui
 
 $ctrl
 
 $lng
 
 $action
 
- 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
 

Private Member Functions

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

Additional Inherited Members

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

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjBibliographicAdminLibrariesFormGUI::__construct (   $parent_gui,
  $bibl_setting 
)

Constructor.

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

References $bibl_setting, $ilCtrl, $lng, $parent_gui, and initForm().

43  {
44  global $ilCtrl, $lng;
45  $this->ctrl = $ilCtrl;
46  $this->lng = $lng;
47  $this->parent_gui = $parent_gui;
48  $this->bibl_setting = $bibl_setting;
49  if ($bibl_setting->getId() > 0) {
50  $this->action = 'update';
51  } else {
52  $this->action = 'create';
53  }
54  $this->ctrl->saveParameter($parent_gui, 'lib_id');
55  $this->initForm();
56  }
global $ilCtrl
Definition: ilias.php:18
+ Here is the call graph for this function:

Member Function Documentation

◆ fillForm()

ilObjBibliographicAdminLibrariesFormGUI::fillForm ( )
private

Definition at line 95 of file class.ilObjBibliographicAdminLibrariesFormGUI.php.

References ilPropertyFormGUI\setValuesByArray().

Referenced by initForm().

95  {
96  $this->setValuesByArray(array(
97  'name' => $this->bibl_setting->getName(),
98  'url' => $this->bibl_setting->getUrl(),
99  'img' => $this->bibl_setting->getImg(),
100  'show_in_list' => $this->bibl_setting->getShowInList()
101  ));
102  }
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()

ilObjBibliographicAdminLibrariesFormGUI::initForm ( )
private

Init settings property form.

private

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

References $img, ilFormGUI\$name, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), fillForm(), ilFormGUI\setFormAction(), ilFormPropertyGUI\setRequired(), ilPropertyFormGUI\setTitle(), and ilCheckboxInputGUI\setValue().

Referenced by __construct().

64  {
65  $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
66  $name = new ilTextInputGUI($this->lng->txt("bibl_library_name"), 'name');
67  $name->setRequired(true);
68  $name->setValue('');
69  $this->addItem($name);
70  $url = new ilTextInputGUI($this->lng->txt("bibl_library_url"), 'url');
71  $url->setRequired(true);
72  $url->setValue('');
73  $this->addItem($url);
74  $img = new ilTextInputGUI($this->lng->txt("bibl_library_img"), 'img');
75  $img->setValue('');
76  $this->addItem($img);
77  $show_in_list = new ilCheckboxInputGUI($this->lng->txt("bibl_library_show_in_list"), 'show_in_list');
78  $show_in_list->setValue(1);
79  $this->addItem($show_in_list);
80  switch ($this->action) {
81  case 'create':
82  $this->setTitle($this->lng->txt("bibl_settings_new"));
83  $this->addCommandButton('create', $this->lng->txt('save'));
84  break;
85  case 'update':
86  $this->addCommandButton('update', $this->lng->txt('save'));
87  $this->fillForm();
88  $this->setTitle($this->lng->txt("bibl_settings_edit"));
89  break;
90  }
91  $this->addCommandButton('cancel', $this->lng->txt("cancel"));
92  }
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.
setValue($a_value)
Set Value.
This class represents a text property in a property form.
addCommandButton($a_cmd, $a_text)
Add Command button.
setRequired($a_required)
Set Required.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveObject()

ilObjBibliographicAdminLibrariesFormGUI::saveObject ( )

Definition at line 105 of file class.ilObjBibliographicAdminLibrariesFormGUI.php.

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

105  {
106  if (! $this->checkInput()) {
107  return false;
108  }
109  $this->bibl_setting->setName($this->getInput("name"));
110  $this->bibl_setting->setUrl($this->getInput("url"));
111  $this->bibl_setting->setImg($this->getInput("img"));
112  $this->bibl_setting->setShowInList($this->getInput("show_in_list"));
113  switch ($this->action) {
114  case 'create':
115  $this->bibl_setting->create();
116  break;
117  case 'update':
118  $this->bibl_setting->update();
119  break;
120  }
121 
122  return true;
123  }
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

◆ $action

ilObjBibliographicAdminLibrariesFormGUI::$action
protected

◆ $bibl_setting

ilObjBibliographicAdminLibrariesFormGUI::$bibl_setting
protected

Definition at line 20 of file class.ilObjBibliographicAdminLibrariesFormGUI.php.

Referenced by __construct().

◆ $ctrl

ilObjBibliographicAdminLibrariesFormGUI::$ctrl
protected

◆ $lng

ilObjBibliographicAdminLibrariesFormGUI::$lng
protected

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

Referenced by __construct().

◆ $parent_gui

ilObjBibliographicAdminLibrariesFormGUI::$parent_gui
protected

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

Referenced by __construct().


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