ILIAS  release_8 Revision v8.24
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.

111 : bool
112 {
113 return !$this->getKeepOpen();
114 }

References getKeepOpen().

+ Here is the call graph for this function:

◆ getContent()

ilFormGUI::getContent ( )

Reimplemented in ilHierarchyFormGUI, and ilPropertyFormGUI.

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

186 : string
187 {
188 return "";
189 }

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getFormAction()

ilFormGUI::getFormAction ( )

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

41 : string
42 {
43 return $this->formaction;
44 }
string $formaction

References $formaction.

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

+ Here is the caller graph for this function:

◆ getHTML()

ilFormGUI::getHTML ( )

Reimplemented in ilLTIConsumerProviderSelectionFormTableGUI, ilAsyncPropertyFormGUI, ilHierarchyFormGUI, and ilPropertyFormGUI.

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

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()
special template class to simplify handling of ITX/PEAR
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41

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

+ Here is the call graph for this function:

◆ getId()

ilFormGUI::getId ( )

Reimplemented in ilHierarchyFormGUI, and ilMStListCoursesGUI.

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

71 : string
72 {
73 return $this->id;
74 }

References $id.

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

+ Here is the caller graph for this function:

◆ getKeepOpen()

ilFormGUI::getKeepOpen ( )

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

91 : bool
92 {
93 return $this->keepopen;
94 }

References $keepopen.

Referenced by getCloseTag(), and getHTML().

+ Here is the caller graph for this function:

◆ getMultipart()

ilFormGUI::getMultipart ( )

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

61 : bool
62 {
63 return $this->multipart;
64 }

References $multipart.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getName()

ilFormGUI::getName ( )

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

81 : string
82 {
83 return $this->name;
84 }

References $name.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getOpenTag()

ilFormGUI::getOpenTag ( )

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

101 : bool
102 {
103 return $this->opentag;
104 }

References $opentag.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getPreventDoubleSubmission()

ilFormGUI::getPreventDoubleSubmission ( )

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

121 : bool
122 {
124 }
bool $prevent_double_submission

References $prevent_double_submission.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getTarget()

ilFormGUI::getTarget ( )

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

51 : string
52 {
53 return $this->target;
54 }
string $target

References $target.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ setCloseTag()

ilFormGUI::setCloseTag ( bool  $a_val)

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

106 : void
107 {
108 $this->setKeepOpen(!$a_val);
109 }
setKeepOpen(bool $a_keepopen)

References setKeepOpen().

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

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setFormAction()

ilFormGUI::setFormAction ( string  $a_formaction)

Reimplemented in ilAsyncPropertyFormGUI.

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

36 : void
37 {
38 $this->formaction = $a_formaction;
39 }

Referenced by ILIAS\Modules\OrgUnit\ARHelper\BaseForm\__construct(), ilOrgUnitDefaultPermissionFormGUI\__construct(), FormMailCodesGUI\__construct(), ilTestExpressPageObjectGUI\addQuestion(), ilTestRandomQuestionSetGeneralConfigFormGUI\build(), ilAssQuestionSkillAssignmentPropertyFormGUI\build(), ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), ilChatroomHistoryGUI\bySession(), ilPCMediaObjectGUI\changeObjectReference(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellStyle(), ilObjCourseGUI\editMapSettingsObject(), ilObjGroupGUI\editMapSettingsObject(), ilPCMediaObjectGUI\editStyle(), ilForumThreadFormGUI\generateDefaultForm(), ilForumThreadFormGUI\generateMinimalForm(), ilObjAuthSettingsGUI\getApacheAuthSettingsForm(), ilObjStyleSheetGUI\getCloneForm(), ilLTIConsumeProviderFormGUI\getContentSelectionFrame(), ilObjStyleSheetGUI\getCreateForm(), ilSearchBaseGUI\getCreationDateForm(), ilSamlSettingsGUI\getIdpForm(), ilSamlSettingsGUI\getIdpSettingsForm(), ilObjStyleSheetGUI\getImportForm(), ilSearchBaseGUI\getSearchAreaForm(), ilSamlSettingsGUI\getSettingsForm(), ilMailTemplateGUI\getTemplateForm(), ilObjAdvancedEditingGUI\getTinyForm(), ilMailOptionsFormGUI\init(), ilObjOrgUnitGUI\initAdvancedSettingsForm(), ilObjStudyProgrammeGUI\initAdvancedSettingsForm(), ilObjAdvancedEditingGUI\initCharSelectorSettingsForm(), ilObjEmployeeTalkSeriesGUI\initCreateForm(), ilObjGlossaryGUI\initCreateForm(), ilLTIConsumeProviderFormGUI\initDynRegForm(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilObjFolderGUI\initEditForm(), ilContainerGUI\initEditForm(), ilBiblLibraryFormGUI\initForm(), ilBiblFieldFilterFormGUI\initForm(), ilDclTableViewEditFormGUI\initForm(), ilExtIdGUI\initForm(), ilOrgUnitTypeCustomIconsFormGUI\initForm(), ilOrgUnitTypeFormGUI\initForm(), ilStudyProgrammeTypeCustomIconsFormGUI\initForm(), ilAccessibilityDocumentFormGUI\initForm(), ilRegistrationSettingsGUI\initForm(), ilTermsOfServiceSettingsFormGUI\initForm(), ilTermsOfServiceDocumentFormGUI\initForm(), ilWebDAVMountInstructionsDocumentFormGUI\initForm(), ilContainerReferenceGUI\initForm(), ilObjGroupGUI\initForm(), ilLTIConsumeProviderFormGUI\initForm(), ilLTIConsumerSettingsFormGUI\initForm(), ilCalendarAppointmentGUI\initFormConfirmBooking(), ilCourseObjectivesGUI\initFormRandom(), ilMembershipAdministrationGUI\initFormSettings(), ilObjAdvancedEditingGUI\initGeneralPageSettingsForm(), ilObjMDSettingsGUI\initGeneralSettingsForm(), ilConsultationHoursGUI\initGroupForm(), ilCalendarCategoryGUI\initImportForm(), ilObjSCORMLearningModuleGUI\initImportForm(), ilObjCourseGUI\initInfoEditor(), ilObjGroupGUI\initInfoEditor(), ilSkillRootGUI\initInputForm(), ilECSSettingsGUI\initMappingsForm(), ilObjectCustomUserFieldsGUI\initMemberForm(), ilObjContentObjectGUI\initMenuEntryForm(), ilObjContentObjectGUI\initMenuForm(), ilObjUserFolderGUI\initNewAccountMailForm(), ilPageObjectGUI\initOpenedContentForm(), ilObjMDSettingsGUI\initSettingsForm(), and ilLTIConsumeProviderFormGUI\initToolConfigForm().

+ Here is the caller graph for this function:

◆ setId()

ilFormGUI::setId ( string  $a_id)

Reimplemented in ilHierarchyFormGUI.

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

66 : void
67 {
68 $this->id = $a_id;
69 }

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

+ Here is the caller graph for this function:

◆ setKeepOpen()

ilFormGUI::setKeepOpen ( bool  $a_keepopen)

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

86 : void
87 {
88 $this->keepopen = $a_keepopen;
89 }

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

+ Here is the caller graph for this function:

◆ setMultipart()

ilFormGUI::setMultipart ( bool  $a_multipart)

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

56 : void
57 {
58 $this->multipart = $a_multipart;
59 }

Referenced by ilObjCourseGUI\initInfoEditor().

+ Here is the caller graph for this function:

◆ setName()

ilFormGUI::setName ( string  $a_name)

Reimplemented in ilAsyncPropertyFormGUI.

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.

96 : void
97 {
98 $this->opentag = $a_open;
99 }

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

+ Here is the caller graph for this function:

◆ setPreventDoubleSubmission()

ilFormGUI::setPreventDoubleSubmission ( bool  $a_val)

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

116 : void
117 {
118 $this->prevent_double_submission = $a_val;
119 }

Referenced by ilPropertyFormGUI\__construct().

+ Here is the caller graph for this function:

◆ setTarget()

ilFormGUI::setTarget ( string  $a_target)

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

string ilFormGUI::$name = ''
protected

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

Referenced by getName(), and ilBiblLibraryFormGUI\initForm().

◆ $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: