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

Class ilStudyProgrammeTypeAdvancedMetaDataFormGUI. More...

+ Inheritance diagram for ilStudyProgrammeTypeAdvancedMetaDataFormGUI:
+ Collaboration diagram for ilStudyProgrammeTypeAdvancedMetaDataFormGUI:

Public Member Functions

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

 fillObject ()
 Check validity of form and pass values from form to object. More...
 
- Protected Member Functions inherited from ilPropertyFormGUI
 hideRequired ($a_type)
 
 rebuildUploadedFiles ()
 try to rebuild files More...
 

Protected Attributes

 $type
 
 $tpl
 
 $lng
 
 $ctrl
 
 $parent_gui
 
- 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
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilStudyProgrammeTypeAdvancedMetaDataFormGUI::__construct (   $parent_gui,
ilStudyProgrammeType  $type 
)

Definition at line 40 of file class.ilStudyProgrammeTypeAdvancedMetaDataFormGUI.php.

References $DIC, $ilCtrl, $lng, $parent_gui, $tpl, and $type.

41  {
42  global $DIC;
43  $tpl = $DIC['tpl'];
44  $ilCtrl = $DIC['ilCtrl'];
45  $lng = $DIC['lng'];
46  $this->parent_gui = $parent_gui;
47  $this->type = $type;
48  $this->tpl = $tpl;
49  $this->ctrl = $ilCtrl;
50  $this->lng = $lng;
51  $this->lng->loadLanguageModule('meta');
52  $this->initForm();
53  }
global $DIC
Definition: saml.php:7
global $ilCtrl
Definition: ilias.php:18

Member Function Documentation

◆ fillObject()

ilStudyProgrammeTypeAdvancedMetaDataFormGUI::fillObject ( )
protected

Check validity of form and pass values from form to object.

Returns
bool

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

References ilPropertyFormGUI\checkInput(), ilPropertyFormGUI\getInput(), ilUtil\sendFailure(), and ilPropertyFormGUI\setValuesByPost().

Referenced by saveObject().

100  {
101  $this->setValuesByPost();
102  if (!$this->checkInput()) {
103  return false;
104  }
105  try {
106  // Assign and deassign amd records. A plugin could prevent those actions.
107  $record_ids_selected = (array) $this->getInput('amd_records');
108  $record_ids = $this->type->getAssignedAdvancedMDRecordIds(true);
109  $record_ids_removed = array_diff($record_ids, $record_ids_selected);
110  $record_ids_added = array_diff($record_ids_selected, $record_ids);
111  foreach ($record_ids_added as $record_id) {
112  $this->type->assignAdvancedMDRecord($record_id);
113  }
114  foreach ($record_ids_removed as $record_id) {
115  $this->type->deassignAdvancedMdRecord($record_id);
116  }
117  return true;
118  } catch (ilException $e) {
119  ilUtil::sendFailure($e->getMessage());
120  return false;
121  }
122  }
checkInput()
Check Post Input.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.
setValuesByPost()
Set form values from POST values.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ saveObject()

ilStudyProgrammeTypeAdvancedMetaDataFormGUI::saveObject ( )

Save object (create or update)

Returns
bool

Definition at line 61 of file class.ilStudyProgrammeTypeAdvancedMetaDataFormGUI.php.

References PHPMailer\PHPMailer\$options, $records, ilPropertyFormGUI\addCommandButton(), ilPropertyFormGUI\addItem(), fillObject(), ilStudyProgrammeType\getAvailableAdvancedMDRecords(), ilFormGUI\setFormAction(), ilMultiSelectInputGUI\setOptions(), and ilPropertyFormGUI\setTitle().

62  {
63  if (!$this->fillObject()) {
64  return false;
65  }
66  return true;
67  }
fillObject()
Check validity of form and pass values from form to object.
+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilStudyProgrammeTypeAdvancedMetaDataFormGUI::$ctrl
protected

◆ $lng

ilStudyProgrammeTypeAdvancedMetaDataFormGUI::$lng
protected

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

Referenced by __construct().

◆ $parent_gui

ilStudyProgrammeTypeAdvancedMetaDataFormGUI::$parent_gui
protected

Definition at line 37 of file class.ilStudyProgrammeTypeAdvancedMetaDataFormGUI.php.

Referenced by __construct().

◆ $tpl

ilStudyProgrammeTypeAdvancedMetaDataFormGUI::$tpl
protected

Definition at line 22 of file class.ilStudyProgrammeTypeAdvancedMetaDataFormGUI.php.

Referenced by __construct().

◆ $type

ilStudyProgrammeTypeAdvancedMetaDataFormGUI::$type
protected

Definition at line 17 of file class.ilStudyProgrammeTypeAdvancedMetaDataFormGUI.php.

Referenced by __construct().


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