ILIAS  release_5-1 Revision 5.0.0-5477-g43f3e3fab5f
ilNonEditableValueGUI Class Reference

This class represents a non editable value in a property form. More...

+ Inheritance diagram for ilNonEditableValueGUI:
+ Collaboration diagram for ilNonEditableValueGUI:

Public Member Functions

 __construct ($a_title="", $a_id="", $a_disable_escaping=false)
 Constructor. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setType ($a_type)
 Set Type. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 render ()
 render More...
 
 insert (&$a_tpl)
 Insert property html. More...
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. 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...
 
 removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 

Protected Attributes

 $type
 
 $value
 
 $title
 
 $info
 
 $section_icon
 
 $disable_escaping
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- 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 non editable value in a property form.

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

Definition at line 13 of file class.ilNonEditableValueGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilNonEditableValueGUI::__construct (   $a_title = "",
  $a_id = "",
  $a_disable_escaping = false 
)

Constructor.

Parameters

Reimplemented in ilNestedOrderingGUI.

Definition at line 27 of file class.ilNonEditableValueGUI.php.

28 {
29 parent::__construct($a_title, $a_id);
30 $this->setTitle($a_title);
31 $this->setType("non_editable_value");
32 $this->disable_escaping = (bool)$a_disable_escaping;
33 }

References setTitle(), and setType().

+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilNonEditableValueGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Returns
boolean Input ok, true/false

Reimplemented from ilFormPropertyGUI.

Reimplemented in ilNestedOrderingGUI.

Definition at line 35 of file class.ilNonEditableValueGUI.php.

36 {
37 if(!is_array($_POST[$this->getPostVar()]))
38 {
40 }
41 return $this->checkSubItemsInput();
42 }
getPostVar()
Get Post Variable.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
$_POST['username']
Definition: cron.php:12

References $_POST, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), ilFormPropertyGUI\getPostVar(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ getInfo()

ilNonEditableValueGUI::getInfo ( )

Get Information Text.

Returns
string Information Text

Reimplemented from ilFormPropertyGUI.

Definition at line 99 of file class.ilNonEditableValueGUI.php.

References $info.

◆ getTableFilterHTML()

ilNonEditableValueGUI::getTableFilterHTML ( )

Get HTML for table filter.

Implements ilTableFilterItem.

Definition at line 198 of file class.ilNonEditableValueGUI.php.

199 {
200 $html = $this->render();
201 return $html;
202 }
$html
Definition: example_001.php:87

References $html, and render().

+ Here is the call graph for this function:

◆ getTitle()

ilNonEditableValueGUI::getTitle ( )

Get Title.

Returns
string Title

Reimplemented from ilFormPropertyGUI.

Definition at line 79 of file class.ilNonEditableValueGUI.php.

References $title.

◆ getType()

ilNonEditableValueGUI::getType ( )

Get Type.

Returns
string Type

Reimplemented from ilFormPropertyGUI.

Definition at line 59 of file class.ilNonEditableValueGUI.php.

References $type.

◆ getValue()

ilNonEditableValueGUI::getValue ( )

Get Value.

Returns
string Value

Definition at line 124 of file class.ilNonEditableValueGUI.php.

References $value.

Referenced by render().

+ Here is the caller graph for this function:

◆ insert()

ilNonEditableValueGUI::insert ( $a_tpl)

Insert property html.

Definition at line 171 of file class.ilNonEditableValueGUI.php.

172 {
173 $a_tpl->setCurrentBlock("prop_generic");
174 $a_tpl->setVariable("PROP_GENERIC", $this->render());
175 $a_tpl->parseCurrentBlock();
176 }

References render().

+ Here is the call graph for this function:

◆ render()

ilNonEditableValueGUI::render ( )

render

Definition at line 132 of file class.ilNonEditableValueGUI.php.

133 {
134 $tpl = new ilTemplate("tpl.non_editable_value.html", true, true, "Services/Form");
135 if ($this->getPostVar() != "")
136 {
137 $postvar = $this->getPostVar();
138 if($this->getMulti() && substr($postvar, -2) != "[]")
139 {
140 $postvar .= "[]";
141 }
142
143 $tpl->setCurrentBlock("hidden");
144 $tpl->setVariable('NON_EDITABLE_ID', $postvar);
145 $tpl->setVariable('MULTI_HIDDEN_ID', $this->getFieldId());
146 $tpl->setVariable("HVALUE", ilUtil::prepareFormOutput($this->getValue()));
147 $tpl->parseCurrentBlock();
148 }
149 $value = $this->getValue();
150 if(!$this->disable_escaping)
151 {
153 }
154 $tpl->setVariable("VALUE", $value);
155 $tpl->setVariable("ID", $this->getFieldId());
156 $tpl->parseCurrentBlock();
157
158 if ($this->getMulti() && $postvar!= "" && !$this->getDisabled())
159 {
160 $tpl->setVariable("MULTI_ICONS", $this->getMultiIconsHTML());
161 }
162
163
164 return $tpl->get();
165 }
global $tpl
Definition: ilias.php:8
getMultiIconsHTML()
Get HTML for multiple value icons.
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms @access public

References ilFormPropertyGUI\$postvar, $tpl, $value, ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getMulti(), ilFormPropertyGUI\getMultiIconsHTML(), ilFormPropertyGUI\getPostVar(), getValue(), and ilUtil\prepareFormOutput().

Referenced by getTableFilterHTML(), and insert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setInfo()

ilNonEditableValueGUI::setInfo (   $a_info)

Set Information Text.

Parameters
string$a_infoInformation Text

Reimplemented from ilFormPropertyGUI.

Definition at line 89 of file class.ilNonEditableValueGUI.php.

90 {
91 $this->info = $a_info;
92 }

◆ setTitle()

ilNonEditableValueGUI::setTitle (   $a_title)

Set Title.

Parameters
string$a_titleTitle

Reimplemented from ilFormPropertyGUI.

Definition at line 69 of file class.ilNonEditableValueGUI.php.

70 {
71 $this->title = $a_title;
72 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setType()

ilNonEditableValueGUI::setType (   $a_type)

Set Type.

Parameters
string$a_typeType

Reimplemented from ilFormPropertyGUI.

Definition at line 49 of file class.ilNonEditableValueGUI.php.

50 {
51 $this->type = $a_type;
52 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ setValue()

ilNonEditableValueGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

Definition at line 109 of file class.ilNonEditableValueGUI.php.

110 {
111 if($this->getMulti() && is_array($a_value))
112 {
113 $this->setMultiValues($a_value);
114 $a_value = array_shift($a_value);
115 }
116 $this->value = $a_value;
117 }
setMultiValues(array $a_values)
Set multi values.

References ilFormPropertyGUI\getMulti(), and ilFormPropertyGUI\setMultiValues().

Referenced by setValueByArray().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValueByArray()

ilNonEditableValueGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

Definition at line 183 of file class.ilNonEditableValueGUI.php.

184 {
185 if ($this->getPostVar() && isset($a_values[$this->getPostVar()]))
186 {
187 $this->setValue($a_values[$this->getPostVar()]);
188 }
189 foreach($this->getSubItems() as $item)
190 {
191 $item->setValueByArray($a_values);
192 }
193 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $disable_escaping

ilNonEditableValueGUI::$disable_escaping
protected

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

◆ $info

ilNonEditableValueGUI::$info
protected

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

Referenced by getInfo().

◆ $section_icon

ilNonEditableValueGUI::$section_icon
protected

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

◆ $title

ilNonEditableValueGUI::$title
protected

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

Referenced by getTitle().

◆ $type

ilNonEditableValueGUI::$type
protected

Definition at line 15 of file class.ilNonEditableValueGUI.php.

Referenced by getType().

◆ $value

ilNonEditableValueGUI::$value
protected

Definition at line 16 of file class.ilNonEditableValueGUI.php.

Referenced by getValue(), and render().


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