ILIAS  Release_3_10_x_branch Revision 61812
 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.
 getHTML ()
 Get HTML.
 getContent ()
 Get Content.

Protected Attributes

 $formaction
 $multipart = false
 $keepopen = false

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::getContent ( )

Get Content.

Reimplemented in ilPropertyFormGUI, and ilHierarchyFormGUI.

Definition at line 210 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 66 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 154 of file class.ilFormGUI.php.

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

{
$tpl = new ilTemplate("tpl.form.html", true, true, "Services/Form");
if ($this->getTarget() != "")
{
$tpl->setCurrentBlock("form_target");
$tpl->setVariable("FORM_TARGET", $this->getTarget());
$tpl->parseCurrentBlock();
}
// this line also sets multipart, so it must be before the multipart check
$content = $this->getContent();
if ($this->getMultipart())
{
$tpl->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();
}*/
}
$tpl->setVariable("FORM_CONTENT", $content);
$tpl->setVariable("FORM_ACTION", $this->getFormAction());
if (!$this->getKeepOpen())
{
$tpl->setVariable("FORM_CLOSE_TAG", "</form>");
}
if ($this->getId() != "")
{
$tpl->setVariable("FORM_ID", $this->getId());
}
return $tpl->get();
}

+ Here is the call graph for this function:

ilFormGUI::getId ( )

Get Id.

Returns
string Id

Reimplemented in ilHierarchyFormGUI.

Definition at line 126 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 146 of file class.ilFormGUI.php.

References $keepopen.

Referenced by 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 106 of file class.ilFormGUI.php.

References $multipart.

Referenced by getHTML().

{
}

+ Here is the caller graph for this function:

ilFormGUI::getTarget ( )

Get Target.

Returns
string Target

Definition at line 86 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 45 of file class.ilFormGUI.php.

References $GLOBALS.

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

{
$GLOBALS["cnt"] += 1;
//if ($GLOBALS["cnt"] == 3) nj();
}

+ Here is the caller graph for this function:

ilFormGUI::setFormAction (   $a_formaction)

Set FormAction.

Parameters
string$a_formactionFormAction

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

Referenced by ilObjContentObjectGUI\chapters(), 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 116 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 136 of file class.ilFormGUI.php.

{
$this->keepopen = $a_keepopen;
}
ilFormGUI::setMultipart (   $a_multipart)

Set Enctype Multipart/Formdata true/false.

Parameters
boolean$a_multipartEnctype Multipart/Formdata true/false

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

Referenced by ilPropertyFormGUI\insertItem().

{
$this->multipart = $a_multipart;
}

+ Here is the caller graph for this function:

ilFormGUI::setTarget (   $a_target)

Set Target.

Parameters
string$a_targetTarget

Definition at line 76 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().


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