ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilFormGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilFormGUI:
+ Collaboration diagram for ilFormGUI:

Public Member Functions

 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

Protected Attributes

string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning This class represents a form user interface

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 25 of file class.ilFormGUI.php.

Member Function Documentation

◆ getCloseTag()

ilFormGUI::getCloseTag ( )

Definition at line 111 of file class.ilFormGUI.php.

References getKeepOpen().

111  : bool
112  {
113  return !$this->getKeepOpen();
114  }
+ Here is the call graph for this function:

◆ getContent()

ilFormGUI::getContent ( )

Definition at line 186 of file class.ilFormGUI.php.

Referenced by getHTML().

186  : string
187  {
188  return "";
189  }
+ Here is the caller graph for this function:

◆ getFormAction()

ilFormGUI::getFormAction ( )

Definition at line 41 of file class.ilFormGUI.php.

References $formaction.

Referenced by ilOrgUnitDefaultPermissionFormGUI\__construct(), ilDclBaseFieldModel\getConfirmationGUI(), and getHTML().

41  : string
42  {
43  return $this->formaction;
44  }
string $formaction
+ Here is the caller graph for this function:

◆ getHTML()

ilFormGUI::getHTML ( )

Definition at line 126 of file class.ilFormGUI.php.

References $tpl, getContent(), getFormAction(), getId(), getKeepOpen(), getMultipart(), getName(), getOpenTag(), getPreventDoubleSubmission(), and getTarget().

126  : string
127  {
128  $tpl = new ilTemplate("tpl.form.html", true, true, "Services/Form");
129 
130  // this line also sets multipart, so it must be before the multipart check
131  $content = $this->getContent();
132  if ($this->getOpenTag()) {
133  $opentpl = new ilTemplate('tpl.form_open.html', true, true, "Services/Form");
134  if ($this->getTarget() != "") {
135  $opentpl->setCurrentBlock("form_target");
136  $opentpl->setVariable("FORM_TARGET", $this->getTarget());
137  $opentpl->parseCurrentBlock();
138  }
139  if ($this->getName() != "") {
140  $opentpl->setCurrentBlock("form_name");
141  $opentpl->setVariable("FORM_NAME", $this->getName());
142  $opentpl->parseCurrentBlock();
143  }
144  if ($this->getPreventDoubleSubmission()) {
145  $opentpl->setVariable("FORM_CLASS", "preventDoubleSubmission");
146  }
147 
148  if ($this->getMultipart()) {
149  $opentpl->touchBlock("multipart");
150  /*if (function_exists("apc_fetch"))
151  //
152  // Progress bar would need additional browser window (popup)
153  // to not be stopped, when form is submitted (we can't work
154  // with an iframe or httprequest solution here)
155  //
156  {
157  $tpl->touchBlock("onsubmit");
158 
159  //onsubmit="postForm('{ON_ACT}','form_{F_ID}',1); return false;"
160  $tpl->setCurrentBlock("onsubmit");
161  $tpl->setVariable("ON_ACT", $this->getFormAction());
162  $tpl->setVariable("F_ID", $this->getId());
163  $tpl->setVariable("F_ID", $this->getId());
164  $tpl->parseCurrentBlock();
165 
166  $tpl->setCurrentBlock("hidden_progress");
167  $tpl->setVariable("APC_PROGRESS_ID", uniqid());
168  $tpl->setVariable("APC_FORM_ID", $this->getId());
169  $tpl->parseCurrentBlock();
170  }*/
171  }
172  $opentpl->setVariable("FORM_ACTION", $this->getFormAction());
173  if ($this->getId() != "") {
174  $opentpl->setVariable("FORM_ID", $this->getId());
175  }
176  $opentpl->parseCurrentBlock();
177  $tpl->setVariable('FORM_OPEN_TAG', $opentpl->get());
178  }
179  $tpl->setVariable("FORM_CONTENT", $content);
180  if (!$this->getKeepOpen()) {
181  $tpl->setVariable("FORM_CLOSE_TAG", "</form>");
182  }
183  return $tpl->get();
184  }
getPreventDoubleSubmission()
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ Here is the call graph for this function:

◆ getId()

ilFormGUI::getId ( )

Definition at line 71 of file class.ilFormGUI.php.

References $id.

Referenced by ilObjForumGUI\decorateWithAutosave(), and getHTML().

71  : string
72  {
73  return $this->id;
74  }
+ Here is the caller graph for this function:

◆ getKeepOpen()

ilFormGUI::getKeepOpen ( )

Definition at line 91 of file class.ilFormGUI.php.

References $keepopen.

Referenced by getCloseTag(), and getHTML().

91  : bool
92  {
93  return $this->keepopen;
94  }
+ Here is the caller graph for this function:

◆ getMultipart()

ilFormGUI::getMultipart ( )

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

References $multipart.

Referenced by ilPropertyFormGUI\getContent(), and getHTML().

61  : bool
62  {
63  return $this->multipart;
64  }
+ Here is the caller graph for this function:

◆ getName()

ilFormGUI::getName ( )

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

References $name.

Referenced by getHTML().

81  : string
82  {
83  return $this->name;
84  }
+ Here is the caller graph for this function:

◆ getOpenTag()

ilFormGUI::getOpenTag ( )

Definition at line 101 of file class.ilFormGUI.php.

References $opentag.

Referenced by getHTML().

101  : bool
102  {
103  return $this->opentag;
104  }
+ Here is the caller graph for this function:

◆ getPreventDoubleSubmission()

ilFormGUI::getPreventDoubleSubmission ( )

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

References $prevent_double_submission.

Referenced by getHTML().

121  : bool
122  {
124  }
bool $prevent_double_submission
+ Here is the caller graph for this function:

◆ getTarget()

ilFormGUI::getTarget ( )

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

References $target.

Referenced by getHTML().

51  : string
52  {
53  return $this->target;
54  }
string $target
+ Here is the caller graph for this function:

◆ setCloseTag()

ilFormGUI::setCloseTag ( bool  $a_val)

Definition at line 106 of file class.ilFormGUI.php.

References setKeepOpen().

Referenced by ilObjContentObjectGUI\editMenuProperties(), ilSearchBaseGUI\getCreationDateForm(), ilSearchBaseGUI\getSearchAreaForm(), and ilObjMediaPoolGUI\initMediaBulkForm().

106  : void
107  {
108  $this->setKeepOpen(!$a_val);
109  }
setKeepOpen(bool $a_keepopen)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFormAction()

ilFormGUI::setFormAction ( string  $a_formaction)

Definition at line 36 of file class.ilFormGUI.php.

Referenced by FormMailCodesGUI\__construct(), ILIAS\Modules\OrgUnit\ARHelper\BaseForm\__construct(), ilOrgUnitDefaultPermissionFormGUI\__construct(), ilTestExpressPageObjectGUI\addQuestion(), ilTestRandomQuestionSetGeneralConfigFormGUI\build(), ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), ilAssQuestionSkillAssignmentPropertyFormGUI\build(), ilObjEmployeeTalkGUI\cancelDeleteObject(), ilPCMediaObjectGUI\changeObjectReference(), ilObjContentObjectGUI\chapters(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellStyle(), ilObjGroupGUI\editMapSettingsObject(), ilObjCourseGUI\editMapSettingsObject(), ilPCMediaObjectGUI\editStyle(), ilForumThreadFormGUI\generateDefaultForm(), ilForumThreadFormGUI\generateMinimalForm(), ilObjAuthSettingsGUI\getApacheAuthSettingsForm(), ilObjStyleSheetGUI\getCloneForm(), ilLTIConsumeProviderFormGUI\getContentSelectionFrame(), ilObjStyleSheetGUI\getCreateForm(), ilSearchBaseGUI\getCreationDateForm(), ilObjStyleSheetGUI\getImportForm(), ilSearchBaseGUI\getSearchAreaForm(), ilMailTemplateGUI\getTemplateForm(), ilObjAdvancedEditingGUI\getTinyForm(), ilMailOptionsFormGUI\init(), ilObjUserFolderGUI\initAccessRestrictionForm(), ilWikiPageGUI\initAdvancedMetaDataForm(), ilObjStudyProgrammeGUI\initAdvancedSettingsForm(), ilObjOrgUnitGUI\initAdvancedSettingsForm(), ilObjAdvancedEditingGUI\initCharSelectorSettingsForm(), ilAdvancedMDSettingsGUI\initComplexOptionForm(), ilObjEmployeeTalkSeriesGUI\initCreateForm(), ilObjGlossaryGUI\initCreateForm(), ilBlogPostingGUI\initDateForm(), ilLTIConsumeProviderFormGUI\initDynRegForm(), ilObjFolderGUI\initEditForm(), ilObjRootFolderGUI\initEditForm(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilContainerGUI\initEditForm(), ilAdvancedMDSettingsGUI\initFieldForm(), ilDclTableViewEditFormGUI\initForm(), ilTermsOfServiceSettingsFormGUI\initForm(), ilLTIConsumerSettingsFormGUI\initForm(), ilBiblLibraryFormGUI\initForm(), ilBiblFieldFilterFormGUI\initForm(), ilLTIConsumeProviderFormGUI\initForm(), ilOrgUnitTypeCustomIconsFormGUI\initForm(), ilOrgUnitTypeFormGUI\initForm(), ilWebDAVMountInstructionsDocumentFormGUI\initForm(), ilAccessibilityDocumentFormGUI\initForm(), ilTermsOfServiceDocumentFormGUI\initForm(), ilExtIdGUI\initForm(), ilStudyProgrammeTypeCustomIconsFormGUI\initForm(), ilRegistrationSettingsGUI\initForm(), ilContainerReferenceGUI\initForm(), ilObjGroupGUI\initForm(), ilCalendarAppointmentGUI\initFormConfirmBooking(), ilCourseObjectivesGUI\initFormRandom(), ilMembershipAdministrationGUI\initFormSettings(), ilObjAdvancedEditingGUI\initGeneralPageSettingsForm(), ilObjMDSettingsGUI\initGeneralSettingsForm(), ilConsultationHoursGUI\initGroupForm(), ilObjSCORMLearningModuleGUI\initImportForm(), ilCalendarCategoryGUI\initImportForm(), ilObjCourseGUI\initInfoEditor(), ilObjGroupGUI\initInfoEditor(), ilSkillRootGUI\initInputForm(), ilECSSettingsGUI\initMappingsForm(), ilMediaPoolPageGUI\initMediaPoolPageForm(), ilObjectCustomUserFieldsGUI\initMemberForm(), ilObjContentObjectGUI\initMenuEntryForm(), ilObjContentObjectGUI\initMenuForm(), ilObjUserFolderGUI\initNewAccountMailForm(), ilPageObjectGUI\initOpenedContentForm(), ilObjMDSettingsGUI\initSettingsForm(), ilConsultationHoursGUI\initSettingsForm(), ilObjAdvancedEditingGUI\initTagsForm(), ilBlogPostingGUI\initTitleForm(), ilLTIConsumeProviderFormGUI\initToolConfigForm(), ilPCMediaObjectGUI\insert(), ilOrgUnitTypeAdvancedMetaDataFormGUI\saveObject(), ilObjOrgUnitSettingsFormGUI\saveObject(), ilStudyProgrammeTypeAdvancedMetaDataFormGUI\saveObject(), ilAccessibilityCriterionFormGUI\setCheckInputCalled(), ilTermsOfServiceCriterionFormGUI\setCheckInputCalled(), and ilStructureObjectGUI\showHierarchy().

36  : void
37  {
38  $this->formaction = $a_formaction;
39  }
+ Here is the caller graph for this function:

◆ setId()

ilFormGUI::setId ( string  $a_id)

Definition at line 66 of file class.ilFormGUI.php.

Referenced by ilTestRandomQuestionSetGeneralConfigFormGUI\build(), and ilTestRandomQuestionSetPoolDefinitionFormGUI\build().

66  : void
67  {
68  $this->id = $a_id;
69  }
+ Here is the caller graph for this function:

◆ setKeepOpen()

ilFormGUI::setKeepOpen ( bool  $a_keepopen)

Definition at line 86 of file class.ilFormGUI.php.

Referenced by ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellStyle(), and setCloseTag().

86  : void
87  {
88  $this->keepopen = $a_keepopen;
89  }
+ Here is the caller graph for this function:

◆ setMultipart()

ilFormGUI::setMultipart ( bool  $a_multipart)

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

Referenced by ilObjCourseGUI\initInfoEditor(), and ilPropertyFormGUI\insertItem().

56  : void
57  {
58  $this->multipart = $a_multipart;
59  }
+ Here is the caller graph for this function:

◆ setName()

ilFormGUI::setName ( string  $a_name)

Definition at line 76 of file class.ilFormGUI.php.

76  : void
77  {
78  $this->name = $a_name;
79  }

◆ setOpenTag()

ilFormGUI::setOpenTag ( bool  $a_open)

Definition at line 96 of file class.ilFormGUI.php.

Referenced by ilObjContentObjectGUI\editMenuProperties(), ilSearchBaseGUI\getCreationDateForm(), ilSearchBaseGUI\getSearchAreaForm(), and ilObjMediaPoolGUI\initMediaBulkForm().

96  : void
97  {
98  $this->opentag = $a_open;
99  }
+ Here is the caller graph for this function:

◆ setPreventDoubleSubmission()

ilFormGUI::setPreventDoubleSubmission ( bool  $a_val)

Definition at line 116 of file class.ilFormGUI.php.

Referenced by ilPropertyFormGUI\__construct().

116  : void
117  {
118  $this->prevent_double_submission = $a_val;
119  }
+ Here is the caller graph for this function:

◆ setTarget()

ilFormGUI::setTarget ( string  $a_target)

Definition at line 46 of file class.ilFormGUI.php.

Referenced by ILIAS\Modules\OrgUnit\ARHelper\BaseForm\__construct(), ilOrgUnitDefaultPermissionFormGUI\__construct(), ilObjEmployeeTalkSeriesGUI\initCreateForm(), ilObjGlossaryGUI\initCreateForm(), and ilBiblFieldFilterFormGUI\initForm().

46  : void
47  {
48  $this->target = $a_target;
49  }
+ Here is the caller graph for this function:

Field Documentation

◆ $formaction

string ilFormGUI::$formaction = ""
protected

◆ $id

◆ $keepopen

bool ilFormGUI::$keepopen = false
protected

Definition at line 29 of file class.ilFormGUI.php.

Referenced by getKeepOpen().

◆ $multipart

bool ilFormGUI::$multipart = false
protected

Definition at line 28 of file class.ilFormGUI.php.

Referenced by getMultipart().

◆ $name

◆ $opentag

bool ilFormGUI::$opentag = true
protected

Definition at line 30 of file class.ilFormGUI.php.

Referenced by getOpenTag().

◆ $prevent_double_submission

bool ilFormGUI::$prevent_double_submission = false
protected

Definition at line 34 of file class.ilFormGUI.php.

Referenced by getPreventDoubleSubmission().

◆ $target

string ilFormGUI::$target = ''
protected

Definition at line 33 of file class.ilFormGUI.php.

Referenced by getTarget().


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