ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilFormGUI Class Reference

This class represents a form user interface. 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 class represents a form user interface.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Deprecated:
12 This component will be removed with ILIAS 12

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

Member Function Documentation

◆ getCloseTag()

ilFormGUI::getCloseTag ( )

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

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

References getKeepOpen().

+ Here is the call graph for this function:

◆ getContent()

ilFormGUI::getContent ( )

Reimplemented in ilPropertyFormGUI.

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

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

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getFormAction()

ilFormGUI::getFormAction ( )

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

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

References $formaction.

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

+ Here is the caller graph for this function:

◆ getHTML()

ilFormGUI::getHTML ( )

Reimplemented in ilPropertyFormGUI, ilLTIConsumerProviderSelectionFormTableGUI, and ilAssQuestionSkillAssignmentPropertyFormGUI.

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

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

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

+ Here is the call graph for this function:

◆ getId()

ilFormGUI::getId ( )

Reimplemented in ilMStListCoursesGUI.

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

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

References $id.

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

+ Here is the caller graph for this function:

◆ getKeepOpen()

ilFormGUI::getKeepOpen ( )

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

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

References $keepopen.

Referenced by getCloseTag(), and getHTML().

+ Here is the caller graph for this function:

◆ getMultipart()

ilFormGUI::getMultipart ( )

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

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

References $multipart.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getName()

ilFormGUI::getName ( )

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

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

References $name.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getOpenTag()

ilFormGUI::getOpenTag ( )

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

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

References $opentag.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ getPreventDoubleSubmission()

ilFormGUI::getPreventDoubleSubmission ( )

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

122 : bool
123 {
125 }
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 52 of file class.ilFormGUI.php.

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

References $target.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ setCloseTag()

ilFormGUI::setCloseTag ( bool  $a_val)

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

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

References setKeepOpen().

Referenced by ilObjContentObjectGUI\editMenuProperties().

+ 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 37 of file class.ilFormGUI.php.

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

Referenced by ILIAS\components\OrgUnit\ARHelper\BaseForm\__construct(), FormMailCodesGUI\__construct(), ilOrgUnitPositionFormGUI\__construct(), ilTestRandomQuestionSetGeneralConfigFormGUI\build(), ilAssQuestionSkillAssignmentPropertyFormGUI\build(), ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), assMultipleChoiceGUI\buildEditForm(), ilPCMediaObjectGUI\changeObjectReference(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellStyle(), ilDidacticTemplateSettingsGUI\editImportForm(), ilObjCourseGUI\editMapSettingsObject(), ilObjGroupGUI\editMapSettingsObject(), ilPCMediaObjectGUI\editStyle(), ilForumThreadFormGUI\generateDefaultForm(), ilForumThreadFormGUI\generateMinimalForm(), ilObjStyleSheetGUI\getCloneForm(), ilLTIConsumeProviderFormGUI\getContentSelectionFrame(), ilObjStyleSheetGUI\getCreateForm(), ilObjStyleSheetGUI\getImportForm(), ilMailTemplateGUI\getTemplateForm(), ilMailOptionsFormGUI\init(), ilObjOrgUnitGUI\initAdvancedSettingsForm(), ilObjStudyProgrammeGUI\initAdvancedSettingsForm(), ilObjEmployeeTalkSeriesGUI\initCreateForm(), ilObjGlossaryGUI\initCreateForm(), ilObjSAHSLearningModuleGUI\initCreateForm(), ilLTIConsumeProviderFormGUI\initDynRegForm(), ilObjCourseGUI\initEditForm(), ilObjFolderGUI\initEditForm(), ilDidacticTemplateSettingsGUI\initEditTemplate(), ilAccessibilityDocumentFormGUI\initForm(), ilBiblLibraryFormGUI\initForm(), ilBiblFieldFilterFormGUI\initForm(), ilExtIdGUI\initForm(), ilOrgUnitTypeCustomIconsFormGUI\initForm(), ilRegistrationSettingsGUI\initForm(), ilStudyProgrammeTypeCustomIconsFormGUI\initForm(), ilWebDAVMountInstructionsDocumentFormGUI\initForm(), ilContainerReferenceGUI\initForm(), ilObjGroupGUI\initForm(), ilLTIConsumeProviderFormGUI\initForm(), ilLTIConsumerSettingsFormGUI\initForm(), ilCourseObjectivesGUI\initFormRandom(), ilMembershipAdministrationGUI\initFormSettings(), ilObjAdvancedEditingGUI\initGeneralPageSettingsForm(), ilCalendarCategoryGUI\initImportForm(), ilObjCourseGUI\initInfoEditor(), ilObjGroupGUI\initInfoEditor(), ilSkillRootGUI\initInputForm(), ilECSSettingsGUI\initMappingsForm(), ilObjectCustomUserFieldsGUI\initMemberForm(), ilObjContentObjectGUI\initMenuEntryForm(), ilObjContentObjectGUI\initMenuForm(), ilPageObjectGUI\initOpenedContentForm(), ilLTIConsumeProviderFormGUI\initToolConfigForm(), and ilObjSCORMLearningModuleGUI\initTrackingImportForm().

+ Here is the caller graph for this function:

◆ setId()

ilFormGUI::setId ( string  $a_id)

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

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

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

+ Here is the caller graph for this function:

◆ setKeepOpen()

ilFormGUI::setKeepOpen ( bool  $a_keepopen)

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

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

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 57 of file class.ilFormGUI.php.

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

Referenced by ilObjCourseGUI\initInfoEditor().

+ Here is the caller graph for this function:

◆ setName()

ilFormGUI::setName ( string  $a_name)

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

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

◆ setOpenTag()

ilFormGUI::setOpenTag ( bool  $a_open)

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

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

Referenced by ilObjContentObjectGUI\editMenuProperties().

+ Here is the caller graph for this function:

◆ setPreventDoubleSubmission()

ilFormGUI::setPreventDoubleSubmission ( bool  $a_val)

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

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

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 30 of file class.ilFormGUI.php.

Referenced by getKeepOpen().

◆ $multipart

bool ilFormGUI::$multipart = false
protected

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

Referenced by getMultipart().

◆ $name

string ilFormGUI::$name = ''
protected

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

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

◆ $opentag

bool ilFormGUI::$opentag = true
protected

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

Referenced by getOpenTag().

◆ $prevent_double_submission

bool ilFormGUI::$prevent_double_submission = false
protected

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

Referenced by getPreventDoubleSubmission().

◆ $target

string ilFormGUI::$target = ''
protected

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

Referenced by getTarget().


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