ILIAS  Release_4_2_x_branch Revision 61807
 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.
 setName ($a_name)
 Set Name.
 getName ()
 Get Name.
 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
 $id
 $name

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

Member Function Documentation

ilFormGUI::getCloseTag ( )

Get close tag.

Returns
boolean close tag true/false

Definition at line 188 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 261 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 48 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 196 of file class.ilFormGUI.php.

References $tpl, getContent(), getFormAction(), getId(), getKeepOpen(), getMultipart(), getName(), 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->getName() != "")
{
$opentpl->setCurrentBlock("form_name");
$opentpl->setVariable("FORM_NAME", $this->getName());
$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 108 of file class.ilFormGUI.php.

References $id.

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

References $multipart.

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

{
}

+ Here is the caller graph for this function:

ilFormGUI::getName ( )

Get Name.

Returns
string Name

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

References $name.

Referenced by getHTML().

{
return $this->name;
}

+ Here is the caller graph for this function:

ilFormGUI::getOpenTag ( )

Get Open Form Tag Enabled.

Returns
boolean open form tag enabled

Definition at line 168 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 68 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 29 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 178 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 38 of file class.ilFormGUI.php.

Referenced by FormMailCodesGUI\__construct(), 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 98 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 138 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 78 of file class.ilFormGUI.php.

Referenced by ilPropertyFormGUI\insertItem().

{
$this->multipart = $a_multipart;
}

+ Here is the caller graph for this function:

ilFormGUI::setName (   $a_name)

Set Name.

Useful for Javascript

Parameters
string$a_nameName

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

{
$this->name = $a_name;
}
ilFormGUI::setOpenTag (   $a_open)

Enable/Disable Open Form Tag.

Parameters
boolean$a_keepopenenable/disable form open tag

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

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

Set Target.

Parameters
string$a_targetTarget

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

{
$this->target = $a_target;
}

Field Documentation

ilFormGUI::$formaction
protected

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

Referenced by getFormAction().

ilFormGUI::$id
protected

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

Referenced by getId().

ilFormGUI::$keepopen = false
protected

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

Referenced by getKeepOpen().

ilFormGUI::$multipart = false
protected

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

Referenced by getMultipart().

ilFormGUI::$name
protected

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

Referenced by getName(), and ilPropertyFormGUI\rebuildUploadedFiles().

ilFormGUI::$opentag = true
protected

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

Referenced by getOpenTag().


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