ILIAS  Release_4_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilFormGUI Class Reference

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

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

Public Member Functions

 ilFormGUI ()
 Constructor.
 setFormAction ($a_formaction)
 Set FormAction.
 getFormAction ()
 Get FormAction.
 setTarget ($a_target)
 Set Target.
 getTarget ()
 Get Target.
 setMultipart ($a_multipart)
 Set Enctype Multipart/Formdata true/false.
 getMultipart ()
 Get Enctype Multipart/Formdata true/false.
 setId ($a_id)
 Set Id.
 getId ()
 Get Id.
 setKeepOpen ($a_keepopen)
 Set Keep Form Tag Open.
 getKeepOpen ()
 Get Keep Form Tag Open.
 setOpenTag ($a_open)
 Enable/Disable Open Form Tag.
 getOpenTag ()
 Get Open Form Tag Enabled.
 setCloseTag ($a_val)
 Set close tag.
 getCloseTag ()
 Get close tag.
 getHTML ()
 Get HTML.
 getContent ()
 Get Content.

Protected Attributes

 $formaction
 $multipart = false
 $keepopen = false
 $opentag = true

Detailed Description

This class represents a form user interface.

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

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

Member Function Documentation

ilFormGUI::getCloseTag ( )

Get close tag.

Returns
boolean close tag true/false

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

References getKeepOpen().

{
return !$this->getKeepOpen();
}

+ Here is the call graph for this function:

ilFormGUI::getContent ( )

Get Content.

Reimplemented in ilHierarchyFormGUI, and ilPropertyFormGUI.

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

Referenced by getHTML().

{
return "";
}

+ Here is the caller graph for this function:

ilFormGUI::getFormAction ( )

Get FormAction.

Returns
string FormAction

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

References $formaction.

Referenced by getHTML().

{
}

+ Here is the caller graph for this function:

ilFormGUI::getHTML ( )

Get HTML.

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

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

{
$tpl = new ilTemplate("tpl.form.html", true, true, "Services/Form");
// this line also sets multipart, so it must be before the multipart check
$content = $this->getContent();
if ($this->getOpenTag())
{
$opentpl = new ilTemplate('tpl.form_open.html', true, true, "Services/Form");
if ($this->getTarget() != "")
{
$opentpl->setCurrentBlock("form_target");
$opentpl->setVariable("FORM_TARGET", $this->getTarget());
$opentpl->parseCurrentBlock();
}
if ($this->getMultipart())
{
$opentpl->touchBlock("multipart");
/*if (function_exists("apc_fetch"))
//
// Progress bar would need additional browser window (popup)
// to not be stopped, when form is submitted (we can't work
// with an iframe or httprequest solution here)
//
{
$tpl->touchBlock("onsubmit");
//onsubmit="postForm('{ON_ACT}','form_{F_ID}',1); return false;"
$tpl->setCurrentBlock("onsubmit");
$tpl->setVariable("ON_ACT", $this->getFormAction());
$tpl->setVariable("F_ID", $this->getId());
$tpl->setVariable("F_ID", $this->getId());
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("hidden_progress");
$tpl->setVariable("APC_PROGRESS_ID", uniqid());
$tpl->setVariable("APC_FORM_ID", $this->getId());
$tpl->parseCurrentBlock();
}*/
}
$opentpl->setVariable("FORM_ACTION", $this->getFormAction());
if ($this->getId() != "")
{
$opentpl->setVariable("FORM_ID", $this->getId());
}
$opentpl->parseCurrentBlock();
$tpl->setVariable('FORM_OPEN_TAG', $opentpl->get());
}
$tpl->setVariable("FORM_CONTENT", $content);
if (!$this->getKeepOpen())
{
$tpl->setVariable("FORM_CLOSE_TAG", "</form>");
}
return $tpl->get();
}

+ Here is the call graph for this function:

ilFormGUI::getId ( )

Get Id.

Returns
string Id

Reimplemented in ilHierarchyFormGUI.

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

Referenced by getHTML().

{
return $this->id;
}

+ Here is the caller graph for this function:

ilFormGUI::getKeepOpen ( )

Get Keep Form Tag Open.

Returns
boolean Keep Form Tag Open

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

References $keepopen.

Referenced by getCloseTag(), and getHTML().

{
}

+ Here is the caller graph for this function:

ilFormGUI::getMultipart ( )

Get Enctype Multipart/Formdata true/false.

Returns
boolean Enctype Multipart/Formdata true/false

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

References $multipart.

Referenced by getHTML().

{
}

+ Here is the caller graph for this function:

ilFormGUI::getOpenTag ( )

Get Open Form Tag Enabled.

Returns
boolean open form tag enabled

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

References $opentag.

Referenced by getHTML().

{
}

+ Here is the caller graph for this function:

ilFormGUI::getTarget ( )

Get Target.

Returns
string Target

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

Referenced by getHTML().

{
return $this->target;
}

+ Here is the caller graph for this function:

ilFormGUI::ilFormGUI ( )

Constructor.

Parameters

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

Referenced by ilHierarchyFormGUI\__construct(), and ilPropertyFormGUI\ilPropertyFormGUI().

{
}

+ Here is the caller graph for this function:

ilFormGUI::setCloseTag (   $a_val)

Set close tag.

Parameters
booleanclose tag true/false

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

References setKeepOpen().

{
$this->setKeepOpen(!$a_val);
}

+ Here is the call graph for this function:

ilFormGUI::setFormAction (   $a_formaction)

Set FormAction.

Parameters
string$a_formactionFormAction

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

Referenced by ilObjContentObjectGUI\chapters(), ilObjUserFolderGUI\initLoginSettingsForm(), and ilStructureObjectGUI\showHierarchy().

{
$this->formaction = $a_formaction;
}

+ Here is the caller graph for this function:

ilFormGUI::setId (   $a_id)

Set Id.

If you use multiple forms on a screen you should set this value.

Parameters
string$a_idId

Reimplemented in ilHierarchyFormGUI.

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

{
$this->id = $a_id;
}
ilFormGUI::setKeepOpen (   $a_keepopen)

Set Keep Form Tag Open.

Parameters
boolean$a_keepopenKeep Form Tag Open

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

Referenced by setCloseTag().

{
$this->keepopen = $a_keepopen;
}

+ Here is the caller graph for this function:

ilFormGUI::setMultipart (   $a_multipart)

Set Enctype Multipart/Formdata true/false.

Parameters
boolean$a_multipartEnctype Multipart/Formdata true/false

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

Referenced by ilPropertyFormGUI\insertItem().

{
$this->multipart = $a_multipart;
}

+ Here is the caller graph for this function:

ilFormGUI::setOpenTag (   $a_open)

Enable/Disable Open Form Tag.

Parameters
boolean$a_keepopenenable/disable form open tag

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

{
$this->opentag = $a_open;
}
ilFormGUI::setTarget (   $a_target)

Set Target.

Parameters
string$a_targetTarget

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

{
$this->target = $a_target;
}

Field Documentation

ilFormGUI::$formaction
protected

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

Referenced by getFormAction().

ilFormGUI::$keepopen = false
protected

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

Referenced by getKeepOpen().

ilFormGUI::$multipart = false
protected

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

Referenced by getMultipart().

ilFormGUI::$opentag = true
protected

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

Referenced by getOpenTag().


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