ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value for filter. More...
 
 getFormLabelFor ()
 Get label "for" attribute value for form. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 

Protected Attributes

 $type
 
 $value
 
 $title
 
 $info
 
 $section_icon
 
 $disable_escaping
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $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 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()])) {
39  }
40  return $this->checkSubItemsInput();
41  }
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 98 of file class.ilNonEditableValueGUI.php.

References $info.

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

◆ getTableFilterHTML()

ilNonEditableValueGUI::getTableFilterHTML ( )

Get HTML for table filter.

Implements ilTableFilterItem.

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

References $html, and render().

193  {
194  $html = $this->render();
195  return $html;
196  }
$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 78 of file class.ilNonEditableValueGUI.php.

References $title.

◆ getType()

ilNonEditableValueGUI::getType ( )

Get Type.

Returns
string Type

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

References $type.

◆ getValue()

ilNonEditableValueGUI::getValue ( )

Get Value.

Returns
string Value

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

References $value.

Referenced by render().

123  {
124  return $this->value;
125  }
+ Here is the caller graph for this function:

◆ insert()

ilNonEditableValueGUI::insert (   $a_tpl)

Insert property html.

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

References render().

168  {
169  $a_tpl->setCurrentBlock("prop_generic");
170  $a_tpl->setVariable("PROP_GENERIC", $this->render());
171  $a_tpl->parseCurrentBlock();
172  }
+ Here is the call graph for this function:

◆ render()

ilNonEditableValueGUI::render ( )

render

Definition at line 130 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().

131  {
132  $tpl = new ilTemplate("tpl.non_editable_value.html", true, true, "Services/Form");
133  if ($this->getPostVar() != "") {
134  $postvar = $this->getPostVar();
135  if ($this->getMulti() && substr($postvar, -2) != "[]") {
136  $postvar .= "[]";
137  }
138 
139  $tpl->setCurrentBlock("hidden");
140  $tpl->setVariable('NON_EDITABLE_ID', $postvar);
141  $tpl->setVariable('MULTI_HIDDEN_ID', $this->getFieldId());
142  $tpl->setVariable("HVALUE", ilUtil::prepareFormOutput($this->getValue()));
143  $tpl->parseCurrentBlock();
144  }
145  $value = $this->getValue();
146  if (!$this->disable_escaping) {
148  }
149  $tpl->setVariable("VALUE", $value);
150  if ($this->getFieldId() != "") {
151  $tpl->setVariable("ID", ' id="'.$this->getFieldId().'" ');
152  }
153  $tpl->parseCurrentBlock();
154 
155  if ($this->getMulti() && $postvar != "" && !$this->getDisabled()) {
156  $tpl->setVariable("MULTI_ICONS", $this->getMultiIconsHTML());
157  }
158 
159 
160  return $tpl->get();
161  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
$tpl
Definition: ilias.php:10
getPostVar()
Get Post Variable.
getMultiIconsHTML()
Get HTML for multiple value icons.
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 88 of file class.ilNonEditableValueGUI.php.

References info().

Referenced by ilSystemStyleSettingsGUI\editSystemStyleForm(), ilSetupGUI\initBasicSettingsForm(), ilObjLinkResourceGUI\initFormLink(), and ilObjSCORM2004LearningModuleGUI\initPropertiesEditableForm().

89  {
90  $this->info = $a_info;
91  }
info()
Definition: info.php:2
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setTitle()

ilNonEditableValueGUI::setTitle (   $a_title)

Set Title.

Parameters
string$a_titleTitle

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

Referenced by __construct().

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

◆ setType()

ilNonEditableValueGUI::setType (   $a_type)

Set Type.

Parameters
string$a_typeType

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

References $a_type.

Referenced by __construct().

49  {
50  $this->type = $a_type;
51  }
$a_type
Definition: workflow.php:92
+ Here is the caller graph for this function:

◆ setValue()

ilNonEditableValueGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

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

Referenced by ilMemberAgreementGUI\addCustomFields(), ilUserProfile\addStandardFieldsToForm(), ilTestRandomQuestionSetPoolDefinitionFormGUI\build(), ilAssQuestionSkillAssignmentPropertyFormGUI\build(), ilObjTestDynamicQuestionSetConfigGUI\buildForm(), ilObjContentPageGUI\buildStylePropertiesForm(), ilTestEvaluationGUI\detailedEvaluation(), ilECSMappingSettingsGUI\dInitFormTreeSettings(), ilBasicSkillGUI\editLevelTrigger(), ilCourseRegistrationGUI\fillRegistrationPeriod(), ilGroupRegistrationGUI\fillRegistrationPeriod(), ilGroupRegistrationGUI\fillRegistrationType(), ilObjUserGUI\getValues(), ilObjUserGUI\handleIgnoredRequiredFields(), ilSetupGUI\initClientDbForm(), ilSetupGUI\initClientIniForm(), ilSetupGUI\initClientOverviewForm(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilObjPortfolioGUI\initCreatePortfolioFromTemplateForm(), ilSetupGUI\initDbSlaveForm(), ilCalendarAppointmentGUI\initForm(), ilPageLayoutGUI\initForm(), ilSkillTemplateReferenceGUI\initForm(), ilCalendarCategoryGUI\initFormCategory(), ilConditionHandlerGUI\initFormCondition(), ilObjLoggingSettingsGUI\initFormErrorSettings(), ilObjUserFolderGUI\initFormGeneralSettings(), ilAuthShibbolethSettingsGUI\initFormRoleAssignment(), ilLDAPSettingsGUI\initFormRoleAssignments(), ilObjRoleTemplateGUI\initFormRoleTemplate(), ilObjBlogAdministrationGUI\initFormSettings(), ilObjPortfolioAdministrationGUI\initFormSettings(), ilObjCalendarSettingsGUI\initFormSettings(), ilIndividualAssessmentMemberGUI\initGradingForm(), ilLTIProviderObjectSettingGUI\initObjectSettingsForm(), ilExPeerReviewGUI\initPeerReviewItemForm(), ilObjSCORM2004LearningModuleGUI\initPropertiesEditableForm(), ilObjSCORM2004LearningModuleGUI\initPropertiesForm(), ilObjFileGUI\initPropertiesForm(), ilObjSurveyGUI\initPropertiesForm(), ilObjSystemFolderGUI\initServerInfoForm(), ilObjFileBasedLMGUI\initSettingsForm(), ilECSSettingsGUI\initSettingsForm(), ilSetupGUI\initSettingsTypeForm(), ilObjContentObjectGUI\initStylePropertiesForm(), ilObjPortfolioBaseGUI\initStylePropertiesForm(), ilObjSCORM2004LearningModuleGUI\initStylePropertiesForm(), ilObjGlossaryGUI\initStylePropertiesForm(), ilObjWikiGUI\initStylePropertiesForm(), ilContainerGUI\initStylePropertiesForm(), ilObjBlogGUI\initStylePropertiesForm(), ilObjFileAccessSettingsGUI\initUploadSettingsForm(), ilObjSCORMLearningModuleGUI\newModuleVersion(), ilAssQuestionSkillAssignmentPropertyFormGUI\populateLimitedProperties(), ilObjSCORMLearningModuleGUI\properties(), ilTestScoringGUI\saveReturnManScoringParticipantScreen(), setValueByArray(), ilRegistrationGUI\showCustomFields(), ilAssQuestionHintRequestGUI\showHintCmd(), ilAssQuestionHintsGUI\showHintCmd(), and ilObjComponentSettingsGUI\showPluginSlotInfo().

109  {
110  if ($this->getMulti() && is_array($a_value)) {
111  $this->setMultiValues($a_value);
112  $a_value = array_shift($a_value);
113  }
114  $this->value = $a_value;
115  }
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 179 of file class.ilNonEditableValueGUI.php.

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

180  {
181  if ($this->getPostVar() && isset($a_values[$this->getPostVar()])) {
182  $this->setValue($a_values[$this->getPostVar()]);
183  }
184  foreach ($this->getSubItems() as $item) {
185  $item->setValueByArray($a_values);
186  }
187  }
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: