ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilSubEnabledFormPropertyGUI Class Reference

This class represents a property that may include a sub form. More...

+ Inheritance diagram for ilSubEnabledFormPropertyGUI:
+ Collaboration diagram for ilSubEnabledFormPropertyGUI:

Public Member Functions

 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...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. More...
 

Protected Attributes

 $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

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters ($a_text)
 Remove prohibited characters see #19159. More...
 
- 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 property that may include a sub form.

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

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

Member Function Documentation

◆ addSubItem()

ilSubEnabledFormPropertyGUI::addSubItem (   $a_item)

◆ checkSubItemsInput()

ilSubEnabledFormPropertyGUI::checkSubItemsInput ( )
final

Check SubItems.

Returns
boolean Input ok, true/false

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

References $ok, and getSubItems().

Referenced by ilFormulaInputGUI\checkInput(), ilEssayKeywordWizardInputGUI\checkInput(), ilNonEditableValueGUI\checkInput(), ilMultipleChoiceWizardInputGUI\checkInput(), ilSelectBuilderInputGUI\checkInput(), ilRandomTestROInputGUI\checkInput(), ilCustomInputGUI\checkInput(), ilKprimChoiceWizardInputGUI\checkInput(), ilSelectInputGUI\checkInput(), ilTextWizardInputGUI\checkInput(), ilFileWizardInputGUI\checkInput(), ilMatchingPairWizardInputGUI\checkInput(), ilImageWizardInputGUI\checkInput(), ilSuggestedSolutionSelectorGUI\checkInput(), ilCheckboxInputGUI\checkInput(), ilTagInputGUI\checkInput(), ilMatchingWizardInputGUI\checkInput(), ilMatrixRowWizardInputGUI\checkInput(), ilDateTimeInputGUI\checkInput(), ilSingleChoiceWizardInputGUI\checkInput(), ilCSSRectInputGUI\checkInput(), ilAnswerWizardInputGUI\checkInput(), ilErrorTextWizardInputGUI\checkInput(), ilKVPWizardInputGUI\checkInput(), ilCategoryWizardInputGUI\checkInput(), ilDateDurationInputGUI\checkInput(), ilPasswordInputGUI\checkInput(), ilCombinationInputGUI\checkInput(), ilTextInputGUI\checkInput(), ilNumberInputGUI\checkInput(), ilTextAreaInputGUI\checkInput(), ilMultipleTextsInputGUI\onCheckInput(), ilMultipleImagesInputGUI\onCheckInput(), and ilChatroomAuthInputGUI\setValueByArray().

90  {
91  $ok = true;
92  foreach($this->getSubItems() as $item)
93  {
94  $item_ok = $item->checkInput();
95  if(!$item_ok)
96  {
97  $ok = false;
98  }
99  }
100  return $ok;
101  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getItemByPostVar()

ilSubEnabledFormPropertyGUI::getItemByPostVar (   $a_post_var)

Get item by post var.

Returns
mixed false or item object

Definition at line 126 of file class.ilSubEnabledFormPropertyGUI.php.

References $ret, ilFormPropertyGUI\getPostVar(), and getSubItems().

127  {
128  if ($this->getPostVar() == $a_post_var)
129  {
130  return $this;
131  }
132 
133  foreach($this->getSubItems() as $item)
134  {
135  if ($item->getType() != "section_header")
136  {
137  $ret = $item->getItemByPostVar($a_post_var);
138  if (is_object($ret))
139  {
140  return $ret;
141  }
142  }
143  }
144 
145  return false;
146  }
getPostVar()
Get Post Variable.
$ret
Definition: parser.php:6
+ Here is the call graph for this function:

◆ getSubForm()

ilSubEnabledFormPropertyGUI::getSubForm ( )
final

Get sub form html.

Definition at line 107 of file class.ilSubEnabledFormPropertyGUI.php.

References getSubItems().

108  {
109  // subitems
110  $pf = null;
111  if (count($this->getSubItems()) > 0)
112  {
113  $pf = new ilPropertyFormGUI();
114  $pf->setMode("subform");
115  $pf->setItems($this->getSubItems());
116  }
117 
118  return $pf;
119  }
This class represents a property form user interface.
+ Here is the call graph for this function:

◆ getSubInputItemsRecursive()

ilSubEnabledFormPropertyGUI::getSubInputItemsRecursive ( )

returns a flat array of possibly existing subitems recursively

Returns
array

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

References array.

Referenced by ilRadioGroupInputGUI\getTableFilterHTML(), and ilCheckboxGroupInputGUI\render().

63  {
64  $subInputItems = array();
65 
66  foreach( $this->sub_items as $subItem )
67  {
68  if( $subItem->getType() == 'section_header' )
69  {
70  continue;
71  }
72 
73  $subInputItems[] = $subItem;
74 
75  if( $subItem instanceof ilSubEnabledFormPropertyGUI )
76  {
77  $subInputItems = array_merge( $subInputItems, $subItem->getSubInputItemsRecursive() );
78  }
79  }
80 
81  return $subInputItems;
82  }
Create styles array
The data for the language used.
This class represents a property that may include a sub form.
+ Here is the caller graph for this function:

◆ getSubItems()

Field Documentation

◆ $sub_items

ilSubEnabledFormPropertyGUI::$sub_items = array()
protected

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

Referenced by getSubItems().


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