ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 

Protected Attributes

 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $ctrl
 
 $lng
 
 $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)

Add Subitem.

Parameters
object$a_itemItem

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

43 {
44 $a_item->setParent($this);
45 $this->sub_items[] = $a_item;
46 }

◆ checkSubItemsInput()

ilSubEnabledFormPropertyGUI::checkSubItemsInput ( )
final

Check SubItems.

Returns
boolean Input ok, true/false

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

88 {
89 $ok = true;
90 foreach ($this->getSubItems() as $item) {
91 $item_ok = $item->checkInput();
92 if (!$item_ok) {
93 $ok = false;
94 }
95 }
96 return $ok;
97 }

References $ok, and getSubItems().

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

+ 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

Reimplemented from ilFormPropertyGUI.

Reimplemented in ilCheckboxGroupInputGUI, ilRadioGroupInputGUI, and ilIncomingMailInputGUI.

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

122 {
123 if ($this->getPostVar() == $a_post_var) {
124 return $this;
125 }
126
127 foreach ($this->getSubItems() as $item) {
128 if ($item->getType() != "section_header") {
129 $ret = $item->getItemByPostVar($a_post_var);
130 if (is_object($ret)) {
131 return $ret;
132 }
133 }
134 }
135
136 return false;
137 }
getPostVar()
Get Post Variable.
$ret
Definition: parser.php:6

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

+ Here is the call graph for this function:

◆ getSubForm()

ilSubEnabledFormPropertyGUI::getSubForm ( )
final

Get sub form html.

Reimplemented from ilFormPropertyGUI.

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

104 {
105 // subitems
106 $pf = null;
107 if (count($this->getSubItems()) > 0) {
108 $pf = new ilPropertyFormGUI();
109 $pf->setMode("subform");
110 $pf->setItems($this->getSubItems());
111 }
112
113 return $pf;
114 }
This class represents a property form user interface.

References getSubItems().

+ Here is the call graph for this function:

◆ getSubInputItemsRecursive()

ilSubEnabledFormPropertyGUI::getSubInputItemsRecursive ( )

returns a flat array of possibly existing subitems recursively

Returns
array

Reimplemented in ilIncomingMailInputGUI.

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

64 {
65 $subInputItems = array();
66
67 foreach ($this->sub_items as $subItem) {
68 if ($subItem->getType() == 'section_header') {
69 continue;
70 }
71
72 $subInputItems[] = $subItem;
73
74 if ($subItem instanceof ilSubEnabledFormPropertyGUI) {
75 $subInputItems = array_merge($subInputItems, $subItem->getSubInputItemsRecursive());
76 }
77 }
78
79 return $subInputItems;
80 }
This class represents a property that may include a sub form.

◆ 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: