ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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)
 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
 $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().

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

Member Function Documentation

◆ fillForm()

ilObjBibliographicAdminLibrariesFormGUI::fillForm ( )
private

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

References array, and ilPropertyFormGUI\setValuesByArray().

Referenced by initForm().

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

66  {
67  $this->setFormAction($this->ctrl->getFormAction($this->parent_gui));
68  $name = new ilTextInputGUI($this->lng->txt("bibl_library_name"), 'name');
69  $name->setRequired(true);
70  $name->setValue('');
71  $this->addItem($name);
72  $url = new ilTextInputGUI($this->lng->txt("bibl_library_url"), 'url');
73  $url->setRequired(true);
74  $url->setValue('');
75  $this->addItem($url);
76  $img = new ilTextInputGUI($this->lng->txt("bibl_library_img"), 'img');
77  $img->setValue('');
78  $this->addItem($img);
79  $show_in_list = new ilCheckboxInputGUI($this->lng->txt("bibl_library_show_in_list"), 'show_in_list');
80  $show_in_list->setValue(1);
81  $this->addItem($show_in_list);
82  switch ($this->action) {
83  case 'create':
84  $this->setTitle($this->lng->txt("bibl_settings_new"));
85  $this->addCommandButton('create', $this->lng->txt('save'));
86  break;
87  case 'update':
88  $this->addCommandButton('update', $this->lng->txt('save'));
89  $this->fillForm();
90  $this->setTitle($this->lng->txt("bibl_settings_edit"));
91  break;
92  }
93  $this->addCommandButton('cancel', $this->lng->txt("cancel"));
94  }
This class represents a checkbox property in a property form.
setFormAction($a_formaction)
Set FormAction.
addItem($a_item)
Add Item (Property, SectionHeader).
$url
Definition: shib_logout.php:72
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.
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 107 of file class.ilObjBibliographicAdminLibrariesFormGUI.php.

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

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