ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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.

References getKeepOpen().

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

◆ getContent()

ilFormGUI::getContent ( )

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

Referenced by getHTML().

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

◆ getFormAction()

ilFormGUI::getFormAction ( )

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

References $formaction.

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

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

◆ getHTML()

ilFormGUI::getHTML ( )

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

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

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()
+ Here is the call graph for this function:

◆ getId()

ilFormGUI::getId ( )

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

References $id.

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

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

◆ getKeepOpen()

ilFormGUI::getKeepOpen ( )

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

References $keepopen.

Referenced by getCloseTag(), and getHTML().

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

◆ getMultipart()

ilFormGUI::getMultipart ( )

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

References $multipart.

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

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

◆ getName()

ilFormGUI::getName ( )

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

References $name.

Referenced by getHTML().

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

◆ getOpenTag()

ilFormGUI::getOpenTag ( )

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

References $opentag.

Referenced by getHTML().

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

◆ getPreventDoubleSubmission()

ilFormGUI::getPreventDoubleSubmission ( )

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

References $prevent_double_submission.

Referenced by getHTML().

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

◆ getTarget()

ilFormGUI::getTarget ( )

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

References $target.

Referenced by getHTML().

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

◆ setCloseTag()

ilFormGUI::setCloseTag ( bool  $a_val)

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

References setKeepOpen().

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

107  : void
108  {
109  $this->setKeepOpen(!$a_val);
110  }
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 37 of file class.ilFormGUI.php.

Referenced by FormMailCodesGUI\__construct(), ILIAS\components\OrgUnit\ARHelper\BaseForm\__construct(), ilOrgUnitPositionFormGUI\__construct(), ilTestRandomQuestionSetGeneralConfigFormGUI\build(), ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), ilAssQuestionSkillAssignmentPropertyFormGUI\build(), assMultipleChoiceGUI\buildEditForm(), ilPCMediaObjectGUI\changeObjectReference(), ilPCTableGUI\editCellAlignment(), ilPCTableGUI\editCellStyle(), ilObjGroupGUI\editMapSettingsObject(), ilObjCourseGUI\editMapSettingsObject(), ilPCMediaObjectGUI\editStyle(), ilForumThreadFormGUI\generateDefaultForm(), ilForumThreadFormGUI\generateMinimalForm(), ilObjStyleSheetGUI\getCloneForm(), ilLTIConsumeProviderFormGUI\getContentSelectionFrame(), ilObjStyleSheetGUI\getCreateForm(), ilObjStyleSheetGUI\getImportForm(), ilMailTemplateGUI\getTemplateForm(), ilMailOptionsFormGUI\init(), ilObjUserFolderGUI\initAccessRestrictionForm(), ilWikiPageGUI\initAdvancedMetaDataForm(), ilObjStudyProgrammeGUI\initAdvancedSettingsForm(), ilObjOrgUnitGUI\initAdvancedSettingsForm(), ilPCDataTableGUI\initCellPropertiesForm(), ilAdvancedMDSettingsGUI\initComplexOptionForm(), ilObjEmployeeTalkSeriesGUI\initCreateForm(), ilObjSAHSLearningModuleGUI\initCreateForm(), ilObjGlossaryGUI\initCreateForm(), ilPCDataTableGUI\initCreationForm(), ilBlogPostingGUI\initDateForm(), ilLTIConsumeProviderFormGUI\initDynRegForm(), ilObjFolderGUI\initEditForm(), ilObjRootFolderGUI\initEditForm(), ilObjCategoryGUI\initEditForm(), ilObjCourseGUI\initEditForm(), ilContainerGUI\initEditForm(), ilPCDataTableGUI\initEditingForm(), ilAdvancedMDSettingsGUI\initFieldForm(), ilWebDAVMountInstructionsDocumentFormGUI\initForm(), ilLTIConsumerSettingsFormGUI\initForm(), ilBiblFieldFilterFormGUI\initForm(), ilBiblLibraryFormGUI\initForm(), ilLTIConsumeProviderFormGUI\initForm(), ilOrgUnitTypeCustomIconsFormGUI\initForm(), ilAccessibilityDocumentFormGUI\initForm(), ilExtIdGUI\initForm(), ilStudyProgrammeTypeCustomIconsFormGUI\initForm(), ilRegistrationSettingsGUI\initForm(), ilContainerReferenceGUI\initForm(), ilObjGroupGUI\initForm(), ilCourseObjectivesGUI\initFormRandom(), ilMembershipAdministrationGUI\initFormSettings(), ilObjAdvancedEditingGUI\initGeneralPageSettingsForm(), ilPCDataTableGUI\initImportForm(), ilCalendarCategoryGUI\initImportForm(), ilObjCourseGUI\initInfoEditor(), ilObjGroupGUI\initInfoEditor(), ilSkillRootGUI\initInputForm(), ilECSSettingsGUI\initMappingsForm(), ilMediaPoolPageGUI\initMediaPoolPageForm(), ilObjectCustomUserFieldsGUI\initMemberForm(), ilObjContentObjectGUI\initMenuEntryForm(), ilObjContentObjectGUI\initMenuForm(), ilObjUserFolderGUI\initNewAccountMailForm(), ilPageObjectGUI\initOpenedContentForm(), ilConsultationHoursGUI\initSettingsForm(), ilBlogPostingGUI\initTitleForm(), ilLTIConsumeProviderFormGUI\initToolConfigForm(), ilObjSCORMLearningModuleGUI\initTrackingImportForm(), ilPCMediaObjectGUI\insert(), ilStudyProgrammeTypeAdvancedMetaDataFormGUI\saveObject(), ilObjOrgUnitSettingsFormGUI\saveObject(), ilObjEmployeeTalkGUI\sendUpdateNotification(), and ilAccessibilityCriterionFormGUI\setCheckInputCalled().

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

◆ setId()

ilFormGUI::setId ( string  $a_id)

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

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

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

◆ setKeepOpen()

ilFormGUI::setKeepOpen ( bool  $a_keepopen)

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

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

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

◆ setMultipart()

ilFormGUI::setMultipart ( bool  $a_multipart)

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

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

57  : void
58  {
59  $this->multipart = $a_multipart;
60  }
+ 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.

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

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

◆ setPreventDoubleSubmission()

ilFormGUI::setPreventDoubleSubmission ( bool  $a_val)

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

Referenced by ilPropertyFormGUI\__construct().

117  : void
118  {
119  $this->prevent_double_submission = $a_val;
120  }
+ 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

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