ILIAS  release_4-4 Revision
ilHiddenInputGUI Class Reference

This class represents a hidden form property in a property form. More...

+ Inheritance diagram for ilHiddenInputGUI:
+ Collaboration diagram for ilHiddenInputGUI:

Public Member Functions

 __construct ($a_postvar)
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 insert (&$a_tpl)
 Insert property html. More...
 
 getToolbarHTML ()
 Get HTML for toolbar. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 

Protected Attributes

 $value
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Detailed Description

This class represents a hidden form property in a property form.

Author
Roland Küstermann (rkues.nosp@m.term.nosp@m.ann@m.nosp@m.ps.d.nosp@m.e)
Version
$Id$

Definition at line 32 of file class.ilHiddenInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilHiddenInputGUI::__construct (   $a_postvar)

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

Definition at line 41 of file class.ilHiddenInputGUI.php.

References ilFormPropertyGUI\setType().

42  {
43  parent::__construct("", $a_postvar);
44  $this->setType("hidden");
45  }
setType($a_type)
Set Type.
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilHiddenInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

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

74  {
75  return true; // please overwrite
76  }

◆ getToolbarHTML()

ilHiddenInputGUI::getToolbarHTML ( )

Get HTML for toolbar.

Implements ilToolbarItem.

Definition at line 106 of file class.ilHiddenInputGUI.php.

References getValue().

107  {
108  return "<input type=\"hidden\"".
109  " name=\"".$this->getPostVar()."\"".
110  " value=\"".ilUtil::prepareFormOutput($this->getValue())."\"".
111  " id=\"".$this->getFieldId()."\" />";
112  }
+ Here is the call graph for this function:

◆ getValue()

ilHiddenInputGUI::getValue ( )

Get Value.

Returns
string Value

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

References $value.

Referenced by getToolbarHTML(), and insert().

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

◆ insert()

ilHiddenInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

Definition at line 93 of file class.ilHiddenInputGUI.php.

References ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getPostVar(), getValue(), and ilUtil\prepareFormOutput().

94  {
95  $a_tpl->setCurrentBlock("hidden");
96  $a_tpl->setVariable('PROP_INPUT_TYPE','hidden');
97  $a_tpl->setVariable("POST_VAR", $this->getPostVar());
98  $a_tpl->setVariable("ID", $this->getFieldId());
99  $a_tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
100  $a_tpl->parseCurrentBlock();
101  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getPostVar()
Get Post Variable.
getFieldId()
Get Post Variable.
+ Here is the call graph for this function:

◆ setValue()

ilHiddenInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

Referenced by ilPropertyFormGUI\insertItem(), and setValueByArray().

53  {
54  $this->value = $a_value;
55  }
+ Here is the caller graph for this function:

◆ setValueByArray()

ilHiddenInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 83 of file class.ilHiddenInputGUI.php.

References ilFormPropertyGUI\getPostVar(), and setValue().

84  {
85  $this->setValue($a_values[$this->getPostVar()]);
86  }
getPostVar()
Get Post Variable.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:

Field Documentation

◆ $value

ilHiddenInputGUI::$value
protected

Definition at line 33 of file class.ilHiddenInputGUI.php.

Referenced by getValue().


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