Public Member Functions | Protected Attributes

ilFormGUI Class Reference
[Services/Form]

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

Inheritance 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.
 getHTML ()
 Get HTML.
 getContent ()
 Get Content.

Protected Attributes

 $formaction
 $multipart = false

Detailed Description

This class represents a form user interface.

Author:
Alex Killing <alex.killing@gmx.de>
Version:
$Id$

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


Member Function Documentation

ilFormGUI::getContent (  ) 

Get Content.

Reimplemented in ilPropertyFormGUI.

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

Referenced by getHTML().

        {
                return $this->formaction;
        }

Here is the caller graph for this function:

ilFormGUI::getHTML (  ) 

Get HTML.

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

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

        {
                $tpl = new ilTemplate("tpl.form.html", true, true, "Services/Form");
                $tpl->setVariable("FORM_CONTENT", $this->getContent());
                $tpl->setVariable("FORM_ACTION", $this->getFormAction());
                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();
                        }*/
                }
                if ($this->getId() != "")
                {
                        $tpl->setCurrentBlock("form_id");
                        $tpl->setVariable("FORM_ID", $this->getId());
                        $tpl->parseCurrentBlock();
                }
                
                if ($this->getTarget() != "")
                {
                        $tpl->setCurrentBlock("form_target");
                        $tpl->setVariable("FORM_TARGET", $this->getTarget());
                        $tpl->parseCurrentBlock();
                }
                return $tpl->get();
        }

Here is the call graph for this function:

ilFormGUI::getId (  ) 

Get Id.

Returns:
string Id

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

Referenced by getHTML().

        {
                return $this->id;
        }

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

Referenced by getHTML().

        {
                return $this->multipart;
        }

Here is the caller graph for this function:

ilFormGUI::getTarget (  ) 

Get Target.

Returns:
string Target

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

Referenced by ilPropertyFormGUI::ilPropertyFormGUI().

        {
        }

Here is the caller graph for this function:

ilFormGUI::setFormAction ( a_formaction  ) 

Set FormAction.

Parameters:
string $a_formaction FormAction

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

        {
                $this->formaction = $a_formaction;
        }

ilFormGUI::setId ( a_id  ) 

Set Id.

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

Parameters:
string $a_id Id

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

        {
                $this->id = $a_id;
        }

ilFormGUI::setMultipart ( a_multipart  ) 

Set Enctype Multipart/Formdata true/false.

Parameters:
boolean $a_multipart Enctype Multipart/Formdata true/false

Definition at line 93 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_target Target

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

        {
                $this->target = $a_target;
        }


Field Documentation

ilFormGUI::$formaction [protected]

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

ilFormGUI::$multipart = false [protected]

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


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