ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
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 ()
 
 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...
 
 stripSlashesAddSpaceFallback ($a_str)
 Strip slashes with add space fallback, see https://www.ilias.de/mantis/view.php?id=19727. 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

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

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

References setTitle(), and setType().

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  }
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilNonEditableValueGUI::checkInput ( )

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

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

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"]
+ Here is the call graph for this function:

◆ getInfo()

ilNonEditableValueGUI::getInfo ( )

Get Information Text.

Returns
string Information Text

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

References $info.

100  {
101  return $this->info;
102  }

◆ getTableFilterHTML()

ilNonEditableValueGUI::getTableFilterHTML ( )

Get HTML for table filter.

Implements ilTableFilterItem.

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

References $html, and render().

199  {
200  $html = $this->render();
201  return $html;
202  }
$html
Definition: example_001.php:87
+ Here is the call graph for this function:

◆ getTitle()

ilNonEditableValueGUI::getTitle ( )

Get Title.

Returns
string Title

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

References $title.

◆ getType()

ilNonEditableValueGUI::getType ( )

Get Type.

Returns
string Type

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().

125  {
126  return $this->value;
127  }
+ 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.

References render().

172  {
173  $a_tpl->setCurrentBlock("prop_generic");
174  $a_tpl->setVariable("PROP_GENERIC", $this->render());
175  $a_tpl->parseCurrentBlock();
176  }
+ Here is the call graph for this function:

◆ render()

ilNonEditableValueGUI::render ( )

render

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

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

Referenced by getTableFilterHTML(), and insert().

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  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getPostVar()
Get Post Variable.
getMultiIconsHTML()
Get HTML for multiple value icons.
global $tpl
Definition: ilias.php:8
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
+ 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

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

Referenced by ilSystemStyleSettingsGUI\editSystemStyleForm(), ilSetupGUI\initBasicSettingsForm(), ilObjLinkResourceGUI\initFormLink(), and ilLicenseGUI\initLicenseForm().

90  {
91  $this->info = $a_info;
92  }
+ Here is the caller graph for this function:

◆ setTitle()

ilNonEditableValueGUI::setTitle (   $a_title)

Set Title.

Parameters
string$a_titleTitle

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

Referenced by __construct().

70  {
71  $this->title = $a_title;
72  }
+ Here is the caller graph for this function:

◆ setType()

ilNonEditableValueGUI::setType (   $a_type)

Set Type.

Parameters
string$a_typeType

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

References $a_type.

Referenced by __construct().

50  {
51  $this->type = $a_type;
52  }
$a_type
Definition: workflow.php:93
+ 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.

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

Referenced by ilMemberAgreementGUI\addCustomFields(), ilUserProfile\addStandardFieldsToForm(), ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), ilAssQuestionSkillAssignmentPropertyFormGUI\build(), ilObjTestDynamicQuestionSetConfigGUI\buildForm(), ilTestScoringGUI\buildManScoringParticipantForm(), ilTestEvaluationGUI\detailedEvaluation(), ilECSMappingSettingsGUI\dInitFormTreeSettings(), ilBasicSkillGUI\editLevelTrigger(), ilCourseRegistrationGUI\fillRegistrationPeriod(), ilGroupRegistrationGUI\fillRegistrationPeriod(), ilGroupRegistrationGUI\fillRegistrationType(), ilObjUserGUI\getValues(), ilSetupGUI\initClientDbForm(), ilSetupGUI\initClientIniForm(), ilSetupGUI\initClientOverviewForm(), ilObjPortfolioGUI\initCreatePortfolioFromTemplateForm(), ilSetupGUI\initDbSlaveForm(), ilLearningProgressBaseGUI\initEditUserForm(), ilAdvancedMDSettingsGUI\initFieldForm(), ilPageLayoutGUI\initForm(), ilCalendarAppointmentGUI\initForm(), ilExcCriteriaGUI\initForm(), ilSkillTemplateReferenceGUI\initForm(), ilObjMediaObjectGUI\initForm(), ilConditionHandlerGUI\initFormCondition(), ilObjLoggingSettingsGUI\initFormErrorSettings(), ilObjUserFolderGUI\initFormGeneralSettings(), ilAuthShibbolethSettingsGUI\initFormRoleAssignment(), ilLDAPSettingsGUI\initFormRoleAssignments(), ilObjRoleTemplateGUI\initFormRoleTemplate(), ilObjCalendarSettingsGUI\initFormSettings(), ilExPeerReviewGUI\initPeerReviewItemForm(), ilObjSCORM2004LearningModuleGUI\initPropertiesEditableForm(), ilObjSCORM2004LearningModuleGUI\initPropertiesForm(), ilObjSurveyGUI\initPropertiesForm(), ilObjSystemFolderGUI\initServerInfoForm(), ilObjFileBasedLMGUI\initSettingsForm(), ilECSSettingsGUI\initSettingsForm(), ilSetupGUI\initSettingsTypeForm(), ilObjContentObjectGUI\initStylePropertiesForm(), ilObjPortfolioBaseGUI\initStylePropertiesForm(), ilObjSCORM2004LearningModuleGUI\initStylePropertiesForm(), ilObjGlossaryGUI\initStylePropertiesForm(), ilObjWikiGUI\initStylePropertiesForm(), ilObjBlogGUI\initStylePropertiesForm(), ilContainerGUI\initStylePropertiesForm(), ilObjFileAccessSettingsGUI\initUploadSettingsForm(), ilObjForumGUI\isWritingWithPseudonymAllowed(), ilAssQuestionSkillAssignmentPropertyFormGUI\populateLimitedProperties(), ilObjSCORMLearningModuleGUI\properties(), setValueByArray(), ilRegistrationGUI\showCustomFields(), ilAssQuestionHintRequestGUI\showHintCmd(), ilAssQuestionHintsGUI\showHintCmd(), and ilObjComponentSettingsGUI\showPluginSlotInfo().

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.
+ 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.

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

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  }
getPostVar()
Get Post Variable.
+ 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: