ILIAS  release_4-4 Revision
All Data Structures Namespaces Files Functions Variables Modules Pages
ilPropertyFormGUI Class Reference

This class represents a property form user interface. More...

+ Inheritance diagram for ilPropertyFormGUI:
+ Collaboration diagram for ilPropertyFormGUI:

Public Member Functions

 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)
 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...
 
 getHTML ()
 Get HTML. More...
 
 getContent ()
 Get Content. More...
 

Protected Member Functions

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

Protected Attributes

 $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
 

Private Attributes

 $buttons = array()
 
 $items = array()
 

Detailed Description

This class represents a property form user interface.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$ ilPropertyFormGUI: ilFormPropertyDispatchGUI

Definition at line 47 of file class.ilPropertyFormGUI.php.

Member Function Documentation

◆ addCommandButton()

ilPropertyFormGUI::addCommandButton (   $a_cmd,
  $a_text 
)

Add Command button.

Parameters
stringCommand
stringText

Definition at line 532 of file class.ilPropertyFormGUI.php.

Referenced by FormMailCodesGUI\__construct(), ilChatroomFormFactory\applyValues(), ilTestRandomQuestionSetGeneralConfigFormGUI\build(), ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), ilObjForumAdministrationGUI\getSettingsForm(), and assOrderingQuestionGUI\populateCommandButtons().

533  {
534  $this->buttons[] = array("cmd" => $a_cmd, "text" => $a_text);
535  }
+ Here is the caller graph for this function:

◆ addCustomProperty()

ilPropertyFormGUI::addCustomProperty (   $a_title,
  $a_html,
  $a_info = "",
  $a_alert = "",
  $a_required = false 
)

Add a custom property.

Parameters
stringTitle
stringHTML.
stringInfo text.
stringAlert text.
booleanRequired field. (Default false)

Definition at line 517 of file class.ilPropertyFormGUI.php.

519  {
520  $this->properties[] = array ("type" => "custom",
521  "title" => $a_title,
522  "html" => $a_html,
523  "info" => $a_info);
524  }

◆ addItem()

ilPropertyFormGUI::addItem (   $a_item)

Add Item (Property, SectionHeader).

Parameters
object$a_propertyItem object

Definition at line 247 of file class.ilPropertyFormGUI.php.

Referenced by FormMailCodesGUI\__construct(), ilForumCronNotification\activationWasToggled(), ilObjRemoteLearningModuleGUI\addCustomEditForm(), ilObjRemoteGlossaryGUI\addCustomEditForm(), ilObjRemoteWikiGUI\addCustomEditForm(), ilObjRemoteCourseGUI\addCustomEditForm(), ilObjRemoteGroupGUI\addCustomEditForm(), ilObjRemoteTestGUI\addCustomEditForm(), ilMailCronNotification\addCustomSettingsToForm(), ilPaymentCronNotification\addCustomSettingsToForm(), ilDAVCronDiskQuota\addCustomSettingsToForm(), ilConsultationHourCron\addCustomSettingsToForm(), ilCronDeleteInactiveUserAccounts\addCustomSettingsToForm(), ilCronDeleteInactivatedUserAccounts\addCustomSettingsToForm(), SurveyMultipleChoiceQuestionGUI\addFieldsToEditForm(), SurveyMetricQuestionGUI\addFieldsToEditForm(), SurveySingleChoiceQuestionGUI\addFieldsToEditForm(), SurveyTextQuestionGUI\addFieldsToEditForm(), SurveyMatrixQuestionGUI\addFieldsToEditForm(), ilCharSelectorGUI\addFormProperties(), ilPersonalProfileGUI\addLocationToForm(), ilECSObjectSettings\addSettingsToForm(), ilSkillTreeNodeGUI\addStatusInput(), ilChatroomFormFactory\applyValues(), ilTestRandomQuestionSetGeneralConfigFormGUI\build(), ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), ilAssQuestionFeedback\completeGenericFormProperties(), ilAssConfigurableMultiOptionQuestionFeedback\completeSpecificFormProperties(), ilAssMultiOptionQuestionFeedback\completeSpecificFormProperties(), getContent(), ilObjForumAdministrationGUI\getSettingsForm(), ilObjPortfolioTemplateGUI\initDidacticTemplate(), ilObjectGUI\initDidacticTemplate(), ilObjPollGUI\initEditCustomForm(), ilObjBlogGUI\initEditCustomForm(), ilObjBookingPoolGUI\initEditCustomForm(), ilObjPortfolioBaseGUI\initEditCustomForm(), ilObjFolderGUI\initEditCustomForm(), ilObjPortfolioTemplateGUI\initEditCustomForm(), ilObjMediaPoolGUI\initEditCustomForm(), ilObjBibliographicGUI\initEditCustomForm(), ilObjDataCollectionGUI\initEditCustomForm(), ilObjExerciseGUI\initEditCustomForm(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilObjForumGUI\initSessionStorage(), insertItem(), ilAdministrationSettingsFormHandler\parseFieldDefinition(), assErrorTextGUI\populateAnswerSpecificFormPart(), assMatchingQuestionGUI\populateAnswerSpecificFormPart(), assOrderingQuestionGUI\populateAnswerSpecificFormPart(), assNumericGUI\populateAnswerSpecificFormPart(), assTextSubsetGUI\populateAnswerSpecificFormPart(), assTextQuestionGUI\populateAnswerSpecificFormPart(), assSingleChoiceGUI\populateAnswerSpecificFormPart(), assMultipleChoiceGUI\populateAnswerSpecificFormPart(), assFileUploadGUI\populateQuestionSpecificFormPart(), assJavaAppletGUI\populateQuestionSpecificFormPart(), assFlashQuestionGUI\populateQuestionSpecificFormPart(), assErrorTextGUI\populateQuestionSpecificFormPart(), assImagemapQuestionGUI\populateQuestionSpecificFormPart(), assMatchingQuestionGUI\populateQuestionSpecificFormPart(), assOrderingQuestionGUI\populateQuestionSpecificFormPart(), assClozeTestGUI\populateQuestionSpecificFormPart(), assNumericGUI\populateQuestionSpecificFormPart(), assTextSubsetGUI\populateQuestionSpecificFormPart(), assOrderingHorizontalGUI\populateQuestionSpecificFormPart(), assTextQuestionGUI\populateQuestionSpecificFormPart(), assSingleChoiceGUI\populateQuestionSpecificFormPart(), assMultipleChoiceGUI\populateQuestionSpecificFormPart(), and assQuestionGUI\populateTaxonomyFormSection().

248  {
249  $a_item->setParentForm($this);
250  return $this->items[] = $a_item;
251  }
+ Here is the caller graph for this function:

◆ checkInput()

ilPropertyFormGUI::checkInput ( )

Check Post Input.

This method also strips slashes and html from input and sets the alert texts for the items, if the input was not ok.

Returns
boolean ok true/false

Definition at line 411 of file class.ilPropertyFormGUI.php.

References $_POST, $data, $file, $lng, $ok, getDisableStandardMessage(), keepFileUpload(), and ilUtil\sendFailure().

Referenced by assOrderingQuestionGUI\editQuestion(), and ilScoringAdjustmentGUI\outputAdjustQuestionForm().

412  {
413  global $lng;
414 
415  if ($this->check_input_called)
416  {
417  die ("Error: ilPropertyFormGUI->checkInput() called twice.");
418  }
419 
420  $ok = true;
421  foreach($this->items as $item)
422  {
423  $item_ok = $item->checkInput();
424  if(!$item_ok)
425  {
426  $ok = false;
427  }
428  }
429 
430  // check if POST is missint completely (if post_max_size exceeded)
431  if (count($this->items) > 0 && !is_array($_POST))
432  {
433  $ok = false;
434  }
435 
436  $this->check_input_called = true;
437 
438 
439 
440  // try to keep uploads for another try
441  if(!$ok && $_POST["ilfilehash"] && sizeof($_FILES))
442  {
443  $hash = $_POST["ilfilehash"];
444 
445  foreach($_FILES as $field => $data)
446  {
447  // we support up to 2 nesting levels (see test/assesment)
448  if(is_array($data["tmp_name"]))
449  {
450  foreach($data["tmp_name"] as $idx => $upload)
451  {
452  if(is_array($upload))
453  {
454  foreach($upload as $idx2 => $file)
455  {
456  if($file && is_uploaded_file($file))
457  {
458  $file_name = $data["name"][$idx][$idx2];
459  $file_type = $data["type"][$idx][$idx2];
460  $this->keepFileUpload($hash, $field, $file, $file_name, $file_type, $idx, $idx2);
461  }
462  }
463  }
464  else if($upload && is_uploaded_file($upload))
465  {
466  $file_name = $data["name"][$idx];
467  $file_type = $data["type"][$idx];
468  $this->keepFileUpload($hash, $field, $upload, $file_name, $file_type, $idx);
469  }
470  }
471  }
472  else
473  {
474  $this->keepFileUpload($hash, $field, $data["tmp_name"], $data["name"], $data["type"]);
475  }
476  }
477  }
478 
479 
480  if (!$ok && !$this->getDisableStandardMessage())
481  {
482  ilUtil::sendFailure($lng->txt("form_input_not_valid"));
483  }
484  return $ok;
485  }
print $file
$_POST['username']
Definition: cron.php:12
getDisableStandardMessage()
Get disable standard message.
keepFileUpload($a_hash, $a_field, $a_tmp_name, $a_name, $a_type, $a_index=null, $a_sub_index=null)
Import upload into temp directory.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ clearCommandButtons()

ilPropertyFormGUI::clearCommandButtons ( )

Remove all command buttons.

Definition at line 540 of file class.ilPropertyFormGUI.php.

541  {
542  $this->buttons = array();
543  }

◆ executeCommand()

& ilPropertyFormGUI::executeCommand ( )

Execute command.

Definition at line 81 of file class.ilPropertyFormGUI.php.

References $_REQUEST, $cmd, $ilCtrl, and getItemByPostVar().

82  {
83  global $ilCtrl;
84 
85  $next_class = $ilCtrl->getNextClass($this);
86  $cmd = $ilCtrl->getCmd();
87 
88  switch($next_class)
89  {
90  case 'ilformpropertydispatchgui':
91  $ilCtrl->saveParameter($this, 'postvar');
92  include_once './Services/Form/classes/class.ilFormPropertyDispatchGUI.php';
93  $form_prop_dispatch = new ilFormPropertyDispatchGUI();
94  $item = $this->getItemByPostVar($_REQUEST["postvar"]);
95  $form_prop_dispatch->setItem($item);
96  return $ilCtrl->forwardCommand($form_prop_dispatch);
97  break;
98 
99  }
100  return false;
101  }
getItemByPostVar($a_post_var)
Get Item by POST variable.
$cmd
Definition: sahs_server.php:35
global $ilCtrl
Definition: ilias.php:18
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
Definition: index.php:7
+ Here is the call graph for this function:

◆ getContent()

ilPropertyFormGUI::getContent ( )

Get Content.

Definition at line 548 of file class.ilPropertyFormGUI.php.

References $_POST, $ilSetting, $ilUser, $lng, $tpl, ilCharSelectorGUI\_getCurrentGUI(), ilCharSelectorGUI\_isAllowed(), addItem(), ilCharSelectorConfig\ENABLED, getDescription(), getMode(), ilFormGUI\getMultipart(), getShowTopButtons(), getTableWidth(), getTitle(), getTitleIcon(), getTopAnchor(), ilYuiUtil\initAnimation(), ilYuiUtil\initDom(), ilYuiUtil\initEvent(), insertItem(), and setTitle().

549  {
550  global $lng, $tpl, $ilUser, $ilSetting;
551 
552  include_once("./Services/YUI/classes/class.ilYuiUtil.php");
556 
557  $tpl->addJavaScript("./Services/JavaScript/js/Basic.js");
558  $tpl->addJavaScript("Services/Form/js/Form.js");
559 
560  $this->tpl = new ilTemplate("tpl.property_form.html", true, true, "Services/Form");
561 
562  // check if form has not title and first item is a section header
563  // -> use section header for title and remove section header
564  // -> command buttons are presented on top
565  $fi = $this->items[0];
566  if ($this->getMode() == "std" &&
567  $this->getTitle() == "" &&
568  is_object($fi) && $fi->getType() == "section_header"
569  )
570  {
571  $this->setTitle($fi->getTitle());
572  unset($this->items[0]);
573  }
574 
575 
576  // title icon
577  if ($this->getTitleIcon() != "" && @is_file($this->getTitleIcon()))
578  {
579  $this->tpl->setCurrentBlock("title_icon");
580  $this->tpl->setVariable("IMG_ICON", $this->getTitleIcon());
581  $this->tpl->parseCurrentBlock();
582  }
583 
584  // title
585  if ($this->getTitle() != "")
586  {
587  // commands on top
588  if (count($this->buttons) > 0 && $this->getShowTopButtons())
589  {
590  // command buttons
591  foreach($this->buttons as $button)
592  {
593  $this->tpl->setCurrentBlock("cmd2");
594  $this->tpl->setVariable("CMD", $button["cmd"]);
595  $this->tpl->setVariable("CMD_TXT", $button["text"]);
596  $this->tpl->parseCurrentBlock();
597  }
598  $this->tpl->setCurrentBlock("commands2");
599  $this->tpl->parseCurrentBlock();
600  }
601 
602  if (is_object($ilSetting))
603  {
604  if ($ilSetting->get('char_selector_availability') > 0)
605  {
606  require_once 'Services/UIComponent/CharSelector/classes/class.ilCharSelectorGUI.php';
608  {
609  $char_selector = ilCharSelectorGUI::_getCurrentGUI();
610  if ($char_selector->getConfig()->getAvailability() == ilCharSelectorConfig::ENABLED)
611  {
612  $char_selector->addToPage();
613  $this->tpl->TouchBlock('char_selector');
614  }
615  }
616  }
617  }
618 
619  $this->tpl->setCurrentBlock("header");
620  $this->tpl->setVariable("TXT_TITLE", $this->getTitle());
621  $this->tpl->setVariable("LABEL", $this->getTopAnchor());
622  $this->tpl->setVariable("TXT_DESCRIPTION", $this->getDescription());
623  $this->tpl->parseCurrentBlock();
624  }
625  $this->tpl->touchBlock("item");
626 
627  // properties
628  $this->required_text = false;
629  foreach($this->items as $item)
630  {
631  if ($item->getType() != "hidden")
632  {
633  $this->insertItem($item);
634  }
635  }
636 
637  // required
638  if ($this->required_text && $this->getMode() == "std")
639  {
640  $this->tpl->setCurrentBlock("required_text");
641  $this->tpl->setVariable("TXT_REQUIRED", $lng->txt("required_field"));
642  $this->tpl->parseCurrentBlock();
643  }
644 
645  // command buttons
646  foreach($this->buttons as $button)
647  {
648  $this->tpl->setCurrentBlock("cmd");
649  $this->tpl->setVariable("CMD", $button["cmd"]);
650  $this->tpl->setVariable("CMD_TXT", $button["text"]);
651  $this->tpl->parseCurrentBlock();
652  }
653 
654  // try to keep uploads even if checking input fails
655  if($this->getMultipart())
656  {
657  $hash = $_POST["ilfilehash"];
658  if(!$hash)
659  {
660  $hash = md5(uniqid(mt_rand(), true));
661  }
662  $fhash = new ilHiddenInputGUI("ilfilehash");
663  $fhash->setValue($hash);
664  $this->addItem($fhash);
665  }
666 
667  // hidden properties
668  $hidden_fields = false;
669  foreach($this->items as $item)
670  {
671  if ($item->getType() == "hidden")
672  {
673  $item->insert($this->tpl);
674  $hidden_fields = true;
675  }
676  }
677 
678  if ($this->required_text || count($this->buttons) > 0 || $hidden_fields)
679  {
680  $this->tpl->setCurrentBlock("commands");
681  $this->tpl->parseCurrentBlock();
682  }
683 
684 
685  if ($this->getMode() == "subform")
686  {
687  $this->tpl->touchBlock("sub_table");
688  }
689  else
690  {
691  $this->tpl->touchBlock("std_table");
692  $this->tpl->setVariable('STD_TABLE_WIDTH',$this->getTableWidth());
693  }
694 
695  return $this->tpl->get();
696  }
static _isAllowed()
Check if the CharSelector is allowed for the current GUI.
$_POST['username']
Definition: cron.php:12
static initAnimation()
Init YUI Animation.
getTableWidth()
get table width
getTitleIcon()
Get TitleIcon.
addItem($a_item)
Add Item (Property, SectionHeader).
getMode()
Get Mode ('std', 'subform').
getDescription()
Get description.
static initDom()
Init YUI Dom.
This class represents a hidden form property in a property form.
getTopAnchor()
Get top anchor.
setTitle($a_title)
Set Title.
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
static _getCurrentGUI(ilObjTest $a_test_obj=null)
Get the GUI that is used for the currently available selector (other GUI instances may exist for conf...
getShowTopButtons()
Set show top buttons.
static initEvent()
Init YUI Event.
insertItem($item, $a_sub_item=false)
global $ilUser
Definition: imgupload.php:15
global $ilSetting
Definition: privfeed.php:40
global $lng
Definition: privfeed.php:40
getMultipart()
Get Enctype Multipart/Formdata true/false.
+ Here is the call graph for this function:

◆ getDescription()

ilPropertyFormGUI::getDescription ( )

Get description.

Returns
string description

Definition at line 201 of file class.ilPropertyFormGUI.php.

References $description.

Referenced by getContent().

202  {
203  return $this->description;
204  }
+ Here is the caller graph for this function:

◆ getDisableStandardMessage()

ilPropertyFormGUI::getDisableStandardMessage ( )

Get disable standard message.

Returns
boolean disable standard message

Definition at line 355 of file class.ilPropertyFormGUI.php.

References $disable_standard_message.

Referenced by checkInput().

+ Here is the caller graph for this function:

◆ getFileUpload()

ilPropertyFormGUI::getFileUpload (   $a_field,
  $a_index = null,
  $a_sub_index = null 
)

Get file upload data.

Parameters
string$a_fieldform field
mixed$a_indexform field index (if array)
mixed$a_sub_indexform field subindex (if array)
Returns
array (tmp_name, name, type, error, size, is_upload)

Definition at line 941 of file class.ilPropertyFormGUI.php.

References $res.

Referenced by hasFileUpload(), and moveFileUpload().

942  {
943  $res = array();
944  if($a_index)
945  {
946  if($_FILES[$a_field]["tmp_name"][$a_index][$a_sub_index])
947  {
948  $res = array(
949  "tmp_name" => $_FILES[$a_field]["tmp_name"][$a_index][$a_sub_index],
950  "name" => $_FILES[$a_field]["name"][$a_index][$a_sub_index],
951  "type" => $_FILES[$a_field]["type"][$a_index][$a_sub_index],
952  "error" => $_FILES[$a_field]["error"][$a_index][$a_sub_index],
953  "size" => $_FILES[$a_field]["size"][$a_index][$a_sub_index],
954  "is_upload" => true
955  );
956  }
957  else if($this->reloaded_files[$a_field]["tmp_name"][$a_index][$a_sub_index])
958  {
959  $res = array(
960  "tmp_name" => $this->reloaded_files["tmp_name"][$a_index][$a_sub_index],
961  "name" => $this->reloaded_files["name"][$a_index][$a_sub_index],
962  "type" => $this->reloaded_files["type"][$a_index][$a_sub_index],
963  "error" => $this->reloaded_files["error"][$a_index][$a_sub_index],
964  "size" => $this->reloaded_files["size"][$a_index][$a_sub_index],
965  "is_upload" => false
966  );
967  }
968  }
969  else if($a_sub_index)
970  {
971  if($_FILES[$a_field]["tmp_name"][$a_index])
972  {
973  $res = array(
974  "tmp_name" => $_FILES[$a_field]["tmp_name"][$a_index],
975  "name" => $_FILES[$a_field]["name"][$a_index],
976  "type" => $_FILES[$a_field]["type"][$a_index],
977  "error" => $_FILES[$a_field]["error"][$a_index],
978  "size" => $_FILES[$a_field]["size"][$a_index],
979  "is_upload" => true
980  );
981  }
982  else if($this->reloaded_files[$a_field]["tmp_name"][$a_index])
983  {
984  $res = array(
985  "tmp_name" => $this->reloaded_files[$a_field]["tmp_name"][$a_index],
986  "name" => $this->reloaded_files[$a_field]["name"][$a_index],
987  "type" => $this->reloaded_files[$a_field]["type"][$a_index],
988  "error" => $this->reloaded_files[$a_field]["error"][$a_index],
989  "size" => $this->reloaded_files[$a_field]["size"][$a_index],
990  "is_upload" => false
991  );
992  }
993  }
994  else
995  {
996  if($_FILES[$a_field]["tmp_name"])
997  {
998  $res = array(
999  "tmp_name" => $_FILES[$a_field]["tmp_name"],
1000  "name" => $_FILES[$a_field]["name"],
1001  "type" => $_FILES[$a_field]["type"],
1002  "error" => $_FILES[$a_field]["error"],
1003  "size" => $_FILES[$a_field]["size"],
1004  "is_upload" => true
1005  );
1006  }
1007  else if($this->reloaded_files[$a_field]["tmp_name"])
1008  {
1009  $res = array(
1010  "tmp_name" => $this->reloaded_files[$a_field]["tmp_name"],
1011  "name" => $this->reloaded_files[$a_field]["name"],
1012  "type" => $this->reloaded_files[$a_field]["type"],
1013  "error" => $this->reloaded_files[$a_field]["error"],
1014  "size" => $this->reloaded_files[$a_field]["size"],
1015  "is_upload" => false
1016  );
1017  }
1018  }
1019  return $res;
1020  }
+ Here is the caller graph for this function:

◆ getHideLabels()

ilPropertyFormGUI::getHideLabels ( )

Get a value indicating whether the labels should be hidden or not.

Returns
boolean true, to hide the labels; otherwise, false.

Definition at line 365 of file class.ilPropertyFormGUI.php.

References $hide_labels.

Referenced by insertItem().

366  {
367  return $this->hide_labels;
368  }
+ Here is the caller graph for this function:

◆ getHTML()

ilPropertyFormGUI::getHTML ( )

Definition at line 865 of file class.ilPropertyFormGUI.php.

Referenced by SurveyQuestionGUI\addPhrase(), and assOrderingQuestionGUI\editQuestion().

866  {
867  $html = parent::getHTML();
868 
869  // #13531 - get content that has to reside outside of the parent form tag, e.g. panels/layers
870  foreach($this->items as $item)
871  {
872  // #13536 - ilFormSectionHeaderGUI does NOT extend ilFormPropertyGUI ?!
873  if(method_exists($item, "getContentOutsideFormTag"))
874  {
875  $outside = $item->getContentOutsideFormTag();
876  if($outside)
877  {
878  $html .= $outside;
879  }
880  }
881  }
882 
883  return $html;
884  }
+ Here is the caller graph for this function:

◆ getInput()

ilPropertyFormGUI::getInput (   $a_post_var,
  $ensureValidation = true 
)

Returns the value of a HTTP-POST variable, identified by the passed id.

Parameters
stringThe key used for value determination
booleanA flag whether the form input has to be validated before calling this method
Returns
string The value of a HTTP-POST variable, identified by the passed id public

Definition at line 497 of file class.ilPropertyFormGUI.php.

References $_POST.

Referenced by ilObjForumGUI\getEditFormCustomValues(), ilCharSelectorGUI\getFormValues(), SurveySingleChoiceQuestionGUI\importEditFormValues(), SurveyTextQuestionGUI\importEditFormValues(), SurveyMetricQuestionGUI\importEditFormValues(), SurveyMultipleChoiceQuestionGUI\importEditFormValues(), SurveyMatrixQuestionGUI\importEditFormValues(), ilMemberAgreementGUI\saveCourseDefinedFields(), ilConsultationHourCron\saveCustomSettings(), ilForumCronNotification\saveCustomSettings(), ilAssQuestionFeedback\saveGenericFormProperties(), ilAssConfigurableMultiOptionQuestionFeedback\saveSpecificFormProperties(), ilAssMultiOptionQuestionFeedback\saveSpecificFormProperties(), ilBookingScheduleGUI\setDefinitionFromPost(), ilObjPollGUI\updateCustom(), ilObjBlogGUI\updateCustom(), ilObjBookingPoolGUI\updateCustom(), ilObjPortfolioBaseGUI\updateCustom(), ilObjFolderGUI\updateCustom(), ilObjPortfolioTemplateGUI\updateCustom(), ilObjMediaPoolGUI\updateCustom(), ilObjPortfolioGUI\updateCustom(), ilObjBibliographicGUI\updateCustom(), ilObjDataCollectionGUI\updateCustom(), ilObjExerciseGUI\updateCustom(), ilObjectServiceSettingsGUI\updateServiceSettingsForm(), and SurveyMultipleChoiceQuestionGUI\validateEditForm().

498  {
499  // this check ensures, that checkInput has been called (incl. stripSlashes())
500  if (!$this->check_input_called && $ensureValidation)
501  {
502  die ("Error: ilPropertyFormGUI->getInput() called without calling checkInput() first.");
503  }
504 
505  return $_POST[$a_post_var];
506  }
$_POST['username']
Definition: cron.php:12
+ Here is the caller graph for this function:

◆ getInputItemsRecursive()

ilPropertyFormGUI::getInputItemsRecursive ( )

returns a flat array of all input items including the possibly existing subitems recursively

Returns
array

Definition at line 318 of file class.ilPropertyFormGUI.php.

Referenced by ilTestSettingsChangeConfirmationGUI\populateParametersFromPropertyForm().

319  {
320  $inputItems = array();
321 
322  foreach($this->items as $item)
323  {
324  if( $item->getType() == 'section_header' )
325  {
326  continue;
327  }
328 
329  $inputItems[] = $item;
330 
331  if( $item instanceof ilSubEnabledFormPropertyGUI )
332  {
333  $inputItems = array_merge( $inputItems, $item->getSubInputItemsRecursive() );
334  }
335  }
336 
337  return $inputItems;
338  }
This class represents a property that may include a sub form.
+ Here is the caller graph for this function:

◆ getItemByPostVar()

ilPropertyFormGUI::getItemByPostVar (   $a_post_var)

Get Item by POST variable.

Parameters
string$a_postvarPost Var

Definition at line 274 of file class.ilPropertyFormGUI.php.

References $ret.

Referenced by ilTestRandomQuestionSetPoolDefinitionFormGUI\applySubmit(), ilChatroomFormFactory\applyValues(), executeCommand(), ilObjTestSettingsGeneralGUI\fixPostValuesForInconsistentFormObjectTree(), assSingleChoiceGUI\getAfterParticipationSuppressionAnswerPostVars(), assMultipleChoiceGUI\getAfterParticipationSuppressionQuestionPostVars(), assClozeTestGUI\getAfterParticipationSuppressionQuestionPostVars(), ilAssQuestionFeedback\initGenericFormProperties(), ilAssConfigurableMultiOptionQuestionFeedback\initSpecificFormProperties(), ilAssMultiOptionQuestionFeedback\initSpecificFormProperties(), assMatchingQuestionGUI\isValidTermAndDefinitionAmount(), ilScoringAdjustmentGUI\outputAdjustQuestionForm(), ilObjQuestionPoolSettingsGeneralGUI\performSaveForm(), ilObjTestDynamicQuestionSetConfigGUI\performSaveForm(), ilObjTestSettingsGeneralGUI\performSaveForm(), assOrderingQuestionGUI\populateAnswerSpecificFormPart(), assMatchingQuestionGUI\resetFormValuesForSuppressedPostvars(), assClozeTestGUI\reworkFormForCorrectionMode(), ilTestRandomQuestionSetGeneralConfigFormGUI\save(), ilBookingScheduleGUI\setDefinitionFromPost(), ilCharSelectorGUI\setFormValues(), ilObjPollGUI\updateCustom(), ilObjBlogGUI\updateCustom(), ilObjPortfolioBaseGUI\updateCustom(), ilObjPortfolioTemplateGUI\updateCustom(), and SurveyMultipleChoiceQuestionGUI\validateEditForm().

275  {
276  foreach ($this->items as $key => $item)
277  {
278  if ($item->getType() != "section_header")
279  {
280  //if ($item->getPostVar() == $a_post_var)
281  $ret = $item->getItemByPostVar($a_post_var);
282  if (is_object($ret))
283  {
284  return $ret;
285  }
286  }
287  }
288 
289  return false;
290  }
+ Here is the caller graph for this function:

◆ getItems()

ilPropertyFormGUI::getItems ( )

Get Items.

Returns
array array of item objects

Definition at line 307 of file class.ilPropertyFormGUI.php.

References $items.

Referenced by ilUserFormSettings\exportToForm(), and ilUserFormSettings\importFromForm().

308  {
309  return $this->items;
310  }
+ Here is the caller graph for this function:

◆ getMode()

ilPropertyFormGUI::getMode ( )

Get Mode ('std', 'subform').

Returns
string Mode ('std', 'subform')

Definition at line 141 of file class.ilPropertyFormGUI.php.

References $mode.

Referenced by getContent(), and insertItem().

142  {
143  return $this->mode;
144  }
+ Here is the caller graph for this function:

◆ getShowTopButtons()

ilPropertyFormGUI::getShowTopButtons ( )

Set show top buttons.

Definition at line 237 of file class.ilPropertyFormGUI.php.

References $show_top_buttons.

Referenced by getContent().

238  {
240  }
+ Here is the caller graph for this function:

◆ getTableWidth()

ilPropertyFormGUI::getTableWidth ( )
final

get table width

public

Definition at line 121 of file class.ilPropertyFormGUI.php.

References $tbl_width.

Referenced by getContent().

122  {
123  return $this->tbl_width;
124  }
+ Here is the caller graph for this function:

◆ getTitle()

ilPropertyFormGUI::getTitle ( )

Get Title.

Returns
string Title

Definition at line 161 of file class.ilPropertyFormGUI.php.

Referenced by getContent().

162  {
163  return $this->title;
164  }
+ Here is the caller graph for this function:

◆ getTitleIcon()

ilPropertyFormGUI::getTitleIcon ( )

Get TitleIcon.

Returns
string TitleIcon

Definition at line 181 of file class.ilPropertyFormGUI.php.

References $titleicon.

Referenced by getContent().

182  {
183  return $this->titleicon;
184  }
+ Here is the caller graph for this function:

◆ getTopAnchor()

ilPropertyFormGUI::getTopAnchor ( )

Get top anchor.

Returns
string top anchor

Definition at line 221 of file class.ilPropertyFormGUI.php.

References $top_anchor.

Referenced by getContent().

222  {
223  return $this->top_anchor;
224  }
+ Here is the caller graph for this function:

◆ hasFileUpload()

ilPropertyFormGUI::hasFileUpload (   $a_field,
  $a_index = null,
  $a_sub_index = null 
)

Was any file uploaded?

Parameters
string$a_fieldform field
mixed$a_indexform field index (if array)
mixed$a_sub_indexform field subindex (if array)
Returns
bool

Definition at line 1030 of file class.ilPropertyFormGUI.php.

References $data, and getFileUpload().

1031  {
1032  $data = $this->getFileUpload($a_field, $a_index, $a_sub_index);
1033  return (bool)$data["tmp_name"];
1034  }
getFileUpload($a_field, $a_index=null, $a_sub_index=null)
Get file upload data.
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
+ Here is the call graph for this function:

◆ ilPropertyFormGUI()

ilPropertyFormGUI::ilPropertyFormGUI ( )

Constructor.

Parameters

Definition at line 67 of file class.ilPropertyFormGUI.php.

References $lng, and rebuildUploadedFiles().

68  {
69  global $lng;
70 
71  $lng->loadLanguageModule("form");
72  parent::ilFormGUI();
73 
74  // do it as early as possible
75  $this->rebuildUploadedFiles();
76  }
global $lng
Definition: privfeed.php:40
rebuildUploadedFiles()
try to rebuild files
+ Here is the call graph for this function:

◆ insertItem()

ilPropertyFormGUI::insertItem (   $item,
  $a_sub_item = false 
)

Definition at line 698 of file class.ilPropertyFormGUI.php.

References $lng, $tpl, addItem(), getHideLabels(), ilUtil\getImagePath(), getMode(), ilFormGUI\setMultipart(), and ilHiddenInputGUI\setValue().

Referenced by getContent().

699  {
700  global $tpl, $lng;
701 
702 
703  $cfg = array();
704 
705  //if(method_exists($item, "getMulti") && $item->getMulti())
706  if ($item instanceof ilMultiValuesItem && $item->getMulti())
707  {
708  $tpl->addJavascript("./Services/Form/js/ServiceFormMulti.js");
709 
710  $this->tpl->setCurrentBlock("multi_in");
711  $this->tpl->setVariable("ID", $item->getFieldId());
712  $this->tpl->parseCurrentBlock();
713 
714  $this->tpl->touchBlock("multi_out");
715 
716 
717  // add hidden item to enable preset multi items
718  // not used yet, should replace hidden field stuff
719  $multi_values = $item->getMultiValues();
720  if(is_array($multi_values) && sizeof($multi_values) > 1)
721  {
722  $multi_value = new ilHiddenInputGUI("ilMultiValues~".$item->getPostVar());
723  $multi_value->setValue(implode("~", $multi_values));
724  $this->addItem($multi_value);
725  }
726  $cfg["multi_values"] = $multi_values;
727  }
728 
729  $item->insert($this->tpl);
730 
731  if ($item->getType() == "file" || $item->getType() == "image_file")
732  {
733  $this->setMultipart(true);
734  }
735 
736  if ($item->getType() != "section_header")
737  {
738  $cfg["id"] = $item->getFieldId();
739 
740  // info text
741  if ($item->getInfo() != "")
742  {
743  $this->tpl->setCurrentBlock("description");
744  $this->tpl->setVariable("PROPERTY_DESCRIPTION",
745  $item->getInfo());
746  $this->tpl->parseCurrentBlock();
747  }
748 
749  if ($this->getMode() == "subform")
750  {
751  // required
752  if ($item->getType() != "non_editable_value")
753  {
754  if ($item->getRequired())
755  {
756  $this->tpl->touchBlock("sub_required");
757  $this->required_text = true;
758  }
759  }
760 
761  // hidden title (for accessibility, e.g. file upload)
762  if ($item->getHiddenTitle() != "")
763  {
764  $this->tpl->setCurrentBlock("sub_hid_title");
765  $this->tpl->setVariable("SPHID_TITLE",
766  $item->getHiddenTitle());
767  $this->tpl->parseCurrentBlock();
768  }
769 
770  $this->tpl->setCurrentBlock("sub_prop_start");
771  $this->tpl->setVariable("PROPERTY_TITLE", $item->getTitle());
772  if ($item->getType() != "non_editable_value")
773  {
774  $this->tpl->setVariable("LAB_ID", $item->getFieldId());
775  }
776  $this->tpl->parseCurrentBlock();
777  }
778  else
779  {
780  // required
781  if ($item->getType() != "non_editable_value")
782  {
783  if ($item->getRequired())
784  {
785  $this->tpl->touchBlock("required");
786  $this->required_text = true;
787  }
788  }
789 
790  // hidden title (for accessibility, e.g. file upload)
791  if ($item->getHiddenTitle() != "")
792  {
793  $this->tpl->setCurrentBlock("std_hid_title");
794  $this->tpl->setVariable("PHID_TITLE",
795  $item->getHiddenTitle());
796  $this->tpl->parseCurrentBlock();
797  }
798 
799  $this->tpl->setCurrentBlock("std_prop_start");
800  $this->tpl->setVariable("PROPERTY_TITLE", $item->getTitle());
801  if ($item->getType() != "non_editable_value")
802  {
803  $this->tpl->setVariable("LAB_ID", $item->getFieldId());
804  }
805  if ($this->getHideLabels())
806  {
807  $this->tpl->setVariable("HIDE_LABELS_STYLE", " ilFormOptionHidden");
808  }
809  $this->tpl->parseCurrentBlock();
810  }
811 
812  // alert
813  if ($item->getType() != "non_editable_value" && $item->getAlert() != "")
814  {
815  $this->tpl->setCurrentBlock("alert");
816  $this->tpl->setVariable("IMG_ALERT",
817  ilUtil::getImagePath("icon_alert_s.png"));
818  $this->tpl->setVariable("ALT_ALERT",
819  $lng->txt("alert"));
820  $this->tpl->setVariable("TXT_ALERT",
821  $item->getAlert());
822  $this->tpl->parseCurrentBlock();
823  }
824 
825  // subitems
826  $sf = null;
827  if ($item->getType() != "non_editable_value" or 1)
828  {
829  $sf = $item->getSubForm();
830  if ($item->hideSubForm() && is_object($sf))
831  {
832  $this->tpl->setCurrentBlock("sub_form_hide");
833  $this->tpl->setVariable("DSFID", $item->getFieldId());
834  $this->tpl->parseCurrentBlock();
835  }
836  }
837 
838 
839  $sf_content = "";
840  if (is_object($sf))
841  {
842  $sf_content = $sf->getContent();
843  if ($sf->getMultipart())
844  {
845  $this->setMultipart(true);
846  }
847  $this->tpl->setCurrentBlock("sub_form");
848  $this->tpl->setVariable("PROP_SUB_FORM", $sf_content);
849  $this->tpl->setVariable("SFID", $item->getFieldId());
850  $this->tpl->parseCurrentBlock();
851  }
852 
853  $this->tpl->setCurrentBlock("prop");
854  /* not used yet
855  include_once("./Services/JSON/classes/class.ilJsonUtil.php");
856  $this->tpl->setVariable("ID", $item->getFieldId());
857  $this->tpl->setVariable("CFG", ilJsonUtil::encode($cfg));*/
858  $this->tpl->parseCurrentBlock();
859  }
860 
861 
862  $this->tpl->touchBlock("item");
863  }
addItem($a_item)
Add Item (Property, SectionHeader).
setValue($a_value)
Set Value.
getMode()
Get Mode ('std', 'subform').
setMultipart($a_multipart)
Set Enctype Multipart/Formdata true/false.
This class represents a hidden form property in a property form.
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
Interface for multi values support.
getHideLabels()
Get a value indicating whether the labels should be hidden or not.
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ keepFileUpload()

ilPropertyFormGUI::keepFileUpload (   $a_hash,
  $a_field,
  $a_tmp_name,
  $a_name,
  $a_type,
  $a_index = null,
  $a_sub_index = null 
)
protected

Import upload into temp directory.

Parameters
string$a_hashunique form hash
string$a_fieldform field
string$a_tmp_nametemp file name
string$a_nameoriginal file name
string$a_typefile mime type
mixed$a_indexform field index (if array)
mixed$a_sub_indexform field subindex (if array)
Returns
bool

Definition at line 903 of file class.ilPropertyFormGUI.php.

References $ilUser, ilUtil\createDirectory(), and ilUtil\getDataDir().

Referenced by checkInput().

904  {
905  global $ilUser;
906 
907  $user_id = $ilUser->getId();
908  if(!$user_id || $user_id == ANONYMOUS_USER_ID)
909  {
910  return;
911  }
912 
913  $a_name = ilUtil::getAsciiFileName($a_name);
914 
915  $tmp_file_name = implode("~~", array($user_id,
916  $a_hash,
917  $a_field,
918  $a_index,
919  $a_sub_index,
920  str_replace("/", "~~", $a_type),
921  str_replace("~~", "_", $a_name)));
922 
923  // make sure temp directory exists
924  $temp_path = ilUtil::getDataDir() . "/temp";
925  if (!is_dir($temp_path))
926  {
927  ilUtil::createDirectory($temp_path);
928  }
929 
930  move_uploaded_file($a_tmp_name, $temp_path."/".$tmp_file_name);
931  }
static createDirectory($a_dir, $a_mod=0755)
create directory
global $ilUser
Definition: imgupload.php:15
static getDataDir()
get data directory (outside webspace)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ moveFileUpload()

ilPropertyFormGUI::moveFileUpload (   $a_target_directory,
  $a_field,
  $a_target_name = null,
  $a_index = null,
  $a_sub_index = null 
)

Move upload to target directory.

Parameters
string$a_target_directorytarget directory (without filename!)
string$a_fieldform field
string$a_target_nametarget file name (if different from uploaded file)
mixed$a_indexform field index (if array)
mixed$a_sub_indexform field subindex (if array)
Returns
string target file name incl. path

Definition at line 1046 of file class.ilPropertyFormGUI.php.

References $data, and getFileUpload().

1047  {
1048  if(!is_dir($a_target_directory))
1049  {
1050  return;
1051  }
1052 
1053  $data = $this->getFileUpload($a_field, $a_index, $a_sub_index);
1054  if($data["tmp_name"] && file_exists($data["tmp_name"]))
1055  {
1056  if($a_target_name)
1057  {
1058  $data["name"] = $a_target_name;
1059  }
1060 
1061  $target_file = $a_target_directory."/".$data["name"];
1062  $target_file = str_replace("//", "/", $target_file);
1063 
1064  if($data["is_upload"])
1065  {
1066  if (!move_uploaded_file($data["tmp_name"], $target_file))
1067  {
1068  return;
1069  }
1070  }
1071  else
1072  {
1073  if (!rename($data["tmp_name"], $target_file))
1074  {
1075  return;
1076  }
1077  }
1078 
1079  return $target_file;
1080  }
1081  }
getFileUpload($a_field, $a_index=null, $a_sub_index=null)
Get file upload data.
while($lm_rec=$ilDB->fetchAssoc($lm_set)) $data
+ Here is the call graph for this function:

◆ rebuildUploadedFiles()

ilPropertyFormGUI::rebuildUploadedFiles ( )
protected

try to rebuild files

Definition at line 1086 of file class.ilPropertyFormGUI.php.

References $_POST, $file, $ilUser, ilFormGUI\$name, and ilUtil\getDataDir().

Referenced by ilPropertyFormGUI().

1087  {
1088  global $ilUser;
1089 
1090  if($_POST["ilfilehash"])
1091  {
1092  $user_id = $ilUser->getId();
1093  $temp_path = ilUtil::getDataDir() . "/temp";
1094  if(is_dir($temp_path) && $user_id && $user_id != ANONYMOUS_USER_ID)
1095  {
1096  $reload = array();
1097 
1098  $temp_files = glob($temp_path."/".$ilUser->getId()."~~".$_POST["ilfilehash"]."~~*");
1099  if(is_array($temp_files))
1100  {
1101  foreach($temp_files as $full_file)
1102  {
1103  $file = explode("~~", basename($full_file));
1104  $field = $file[2];
1105  $idx = $file[3];
1106  $idx2 = $file[4];
1107  $type = $file[5]."/".$file[6];
1108  $name = $file[7];
1109 
1110  if($idx2 != "")
1111  {
1112  if(!$_FILES[$field]["tmp_name"][$idx][$idx2])
1113  {
1114  $reload[$field]["tmp_name"][$idx][$idx2] = $full_file;
1115  $reload[$field]["name"][$idx][$idx2] = $name;
1116  $reload[$field]["type"][$idx][$idx2] = $type;
1117  $reload[$field]["error"][$idx][$idx2] = 0;
1118  $reload[$field]["size"][$idx][$idx2] = filesize($full_file);
1119  }
1120  }
1121  else if($idx != "")
1122  {
1123  if(!$_FILES[$field]["tmp_name"][$idx])
1124  {
1125  $reload[$field]["tmp_name"][$idx] = $full_file;
1126  $reload[$field]["name"][$idx] = $name;
1127  $reload[$field]["type"][$idx] = $type;
1128  $reload[$field]["error"][$idx] = 0;
1129  $reload[$field]["size"][$idx] = filesize($full_file);
1130  }
1131  }
1132  else
1133  {
1134  if(!$_FILES[$field]["tmp_name"])
1135  {
1136  $reload[$field]["tmp_name"] = $full_file;
1137  $reload[$field]["name"] = $name;
1138  $reload[$field]["type"] = $type;
1139  $reload[$field]["error"] = 0;
1140  $reload[$field]["size"] = filesize($full_file);
1141  }
1142  }
1143  }
1144  }
1145 
1146  $this->reloaded_files = $reload;
1147  }
1148  }
1149  }
print $file
$_POST['username']
Definition: cron.php:12
global $ilUser
Definition: imgupload.php:15
static getDataDir()
get data directory (outside webspace)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ removeItemByPostVar()

ilPropertyFormGUI::removeItemByPostVar (   $a_post_var)

Remove Item.

Parameters
string$a_postvarPost Var

Definition at line 258 of file class.ilPropertyFormGUI.php.

259  {
260  foreach ($this->items as $key => $item)
261  {
262  if (method_exists($item, "getPostVar") && $item->getPostVar() == $a_post_var)
263  {
264  unset($this->items[$key]);
265  }
266  }
267  }

◆ setDescription()

ilPropertyFormGUI::setDescription (   $a_val)

Set description.

Parameters
stringdescription

Definition at line 191 of file class.ilPropertyFormGUI.php.

192  {
193  $this->description = $a_val;
194  }

◆ setDisableStandardMessage()

ilPropertyFormGUI::setDisableStandardMessage (   $a_val)

Set disable standard message.

Parameters
booleandisable standard message

Definition at line 345 of file class.ilPropertyFormGUI.php.

346  {
347  $this->disable_standard_message = $a_val;
348  }

◆ setHideLabels()

ilPropertyFormGUI::setHideLabels (   $a_value = true)

Set a value indicating whether the labels should be hidden or not.

Parameters
boolean$a_valueIndicates whether the labels should be hidden.

Definition at line 375 of file class.ilPropertyFormGUI.php.

376  {
377  $this->hide_labels = $a_value;
378  }

◆ setItems()

ilPropertyFormGUI::setItems (   $a_items)

Set Items.

Parameters
array$a_itemsarray of item objects

Definition at line 297 of file class.ilPropertyFormGUI.php.

298  {
299  $this->items = $a_items;
300  }

◆ setMode()

ilPropertyFormGUI::setMode (   $a_mode)

Set Mode ('std', 'subform').

Parameters
string$a_modeMode ('std', 'subform')

Definition at line 131 of file class.ilPropertyFormGUI.php.

132  {
133  $this->mode = $a_mode;
134  }

◆ setShowTopButtons()

ilPropertyFormGUI::setShowTopButtons (   $a_val)

Get show top buttons.

Definition at line 229 of file class.ilPropertyFormGUI.php.

230  {
231  $this->show_top_buttons = $a_val;
232  }

◆ setTableWidth()

ilPropertyFormGUI::setTableWidth (   $a_width)
final

Set table width.

public

Parameters
stringtable width

Definition at line 110 of file class.ilPropertyFormGUI.php.

Referenced by assOrderingQuestionGUI\editQuestion().

111  {
112  $this->tbl_width = $a_width;
113  }
+ Here is the caller graph for this function:

◆ setTitle()

ilPropertyFormGUI::setTitle (   $a_title)

◆ setTitleIcon()

ilPropertyFormGUI::setTitleIcon (   $a_titleicon)

Set TitleIcon.

Parameters
string$a_titleiconTitleIcon

Definition at line 171 of file class.ilPropertyFormGUI.php.

172  {
173  $this->titleicon = $a_titleicon;
174  }

◆ setTopAnchor()

ilPropertyFormGUI::setTopAnchor (   $a_val)

Set top anchor.

Parameters
stringtop anchor

Definition at line 211 of file class.ilPropertyFormGUI.php.

212  {
213  $this->top_anchor = $a_val;
214  }

◆ setValuesByArray()

ilPropertyFormGUI::setValuesByArray (   $a_values)

Set form values from an array.

Parameters
array$a_valuesValue array (key is post variable name, value is value)

Definition at line 385 of file class.ilPropertyFormGUI.php.

Referenced by ilObjForumAdministrationGUI\editSettings(), and ilObjWikiSettingsGUI\populateWithCurrentSettings().

386  {
387  foreach($this->items as $item)
388  {
389  $item->setValueByArray($a_values);
390  }
391  }
+ Here is the caller graph for this function:

◆ setValuesByPost()

ilPropertyFormGUI::setValuesByPost ( )

Set form values from POST values.

Definition at line 397 of file class.ilPropertyFormGUI.php.

References $_POST.

Referenced by assOrderingQuestionGUI\editQuestion(), and ilScoringAdjustmentGUI\outputAdjustQuestionForm().

398  {
399  foreach($this->items as $item)
400  {
401  $item->setValueByArray($_POST);
402  }
403  }
$_POST['username']
Definition: cron.php:12
+ Here is the caller graph for this function:

Field Documentation

◆ $buttons

ilPropertyFormGUI::$buttons = array()
private

Definition at line 49 of file class.ilPropertyFormGUI.php.

◆ $check_input_called

ilPropertyFormGUI::$check_input_called = false
protected

Definition at line 52 of file class.ilPropertyFormGUI.php.

◆ $description

ilPropertyFormGUI::$description = ""
protected

Definition at line 56 of file class.ilPropertyFormGUI.php.

Referenced by getDescription().

◆ $disable_standard_message

ilPropertyFormGUI::$disable_standard_message = false
protected

Definition at line 53 of file class.ilPropertyFormGUI.php.

Referenced by getDisableStandardMessage().

◆ $hide_labels

ilPropertyFormGUI::$hide_labels = false
protected

Definition at line 60 of file class.ilPropertyFormGUI.php.

Referenced by getHideLabels().

◆ $items

ilPropertyFormGUI::$items = array()
private

Definition at line 50 of file class.ilPropertyFormGUI.php.

Referenced by getItems().

◆ $mode

ilPropertyFormGUI::$mode = "std"
protected

Definition at line 51 of file class.ilPropertyFormGUI.php.

Referenced by getMode().

◆ $reloaded_files

ilPropertyFormGUI::$reloaded_files
protected

Definition at line 59 of file class.ilPropertyFormGUI.php.

◆ $show_top_buttons

ilPropertyFormGUI::$show_top_buttons = true
protected

Definition at line 58 of file class.ilPropertyFormGUI.php.

Referenced by getShowTopButtons().

◆ $tbl_width

ilPropertyFormGUI::$tbl_width = false
protected

Definition at line 57 of file class.ilPropertyFormGUI.php.

Referenced by getTableWidth().

◆ $titleicon

ilPropertyFormGUI::$titleicon = false
protected

Definition at line 55 of file class.ilPropertyFormGUI.php.

Referenced by getTitleIcon().

◆ $top_anchor

ilPropertyFormGUI::$top_anchor = "il_form_top"
protected

Definition at line 54 of file class.ilPropertyFormGUI.php.

Referenced by getTopAnchor().


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