ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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
 __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

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

Constructor & Destructor Documentation

◆ __construct()

ilObjBibliographicAdminLibrariesFormGUI::__construct (   $parent_gui,
  $bibl_setting 
)

Constructor.

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

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

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

Member Function Documentation

◆ fillForm()

ilObjBibliographicAdminLibrariesFormGUI::fillForm ( )
private

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

References array, and ilPropertyFormGUI\setValuesByArray().

Referenced by initForm().

100  {
101  $this->setValuesByArray(array(
102  'name' => $this->bibl_setting->getName(),
103  'url' => $this->bibl_setting->getUrl(),
104  'img' => $this->bibl_setting->getImg(),
105  'show_in_list' => $this->bibl_setting->getShowInList(),
106  ));
107  }
Create styles array
The data for the language used.
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 67 of file class.ilObjBibliographicAdminLibrariesFormGUI.php.

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

Referenced by __construct().

68  {
69  $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
70  $name = new ilTextInputGUI($this->lng->txt("bibl_library_name"), 'name');
71  $name->setRequired(true);
72  $name->setValue('');
73  $this->addItem($name);
74  $url = new ilTextInputGUI($this->lng->txt("bibl_library_url"), 'url');
75  $url->setRequired(true);
76  $url->setValue('');
77  $this->addItem($url);
78  $img = new ilTextInputGUI($this->lng->txt("bibl_library_img"), 'img');
79  $img->setValue('');
80  $this->addItem($img);
81  $show_in_list = new ilCheckboxInputGUI($this->lng->txt("bibl_library_show_in_list"), 'show_in_list');
82  $show_in_list->setValue(1);
83  $this->addItem($show_in_list);
84  switch ($this->action) {
85  case 'create':
86  $this->setTitle($this->lng->txt("bibl_settings_new"));
87  $this->addCommandButton('create', $this->lng->txt('save'));
88  break;
89  case 'update':
90  $this->addCommandButton('update', $this->lng->txt('save'));
91  $this->fillForm();
92  $this->setTitle($this->lng->txt("bibl_settings_edit"));
93  break;
94  }
95  $this->addCommandButton('cancel', $this->lng->txt("cancel"));
96  }
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, $a_id="")
Add Command button.
$url
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 110 of file class.ilObjBibliographicAdminLibrariesFormGUI.php.

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

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