ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSelectInputGUI Class Reference

This class represents a selection list property in a property form. More...

+ Inheritance diagram for ilSelectInputGUI:
+ Collaboration diagram for ilSelectInputGUI:

Public Member Functions

 __construct (string $a_title="", string $a_postvar="")
 
 setOptions (array $a_options)
 
 getOptions ()
 
 setOptionsLangAttribute (\Closure $langresolve)
 
 getOptionsLangAttribute ($key)
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setValueByArray (array $a_values)
 
 checkInput ()
 
 getInput ()
 
 addCustomAttribute (string $a_attr)
 
 getCustomAttributes ()
 
 render ($a_mode="")
 
 insert (ilTemplate $a_tpl)
 
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 
 setHideSubForm (bool $a_value, ?string $a_condition=null)
 Set initial sub form visibility, optionally add dynamic value-based condition. More...
 
 hideSubForm ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem (ilFormPropertyGUI $a_item)
 
 getSubItems ()
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 
 getItemByPostVar (string $a_post_var)
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct (string $a_title="", string $a_postvar="")
 
 executeCommand ()
 
 getType ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setPostVar (string $a_postvar)
 
 getPostVar ()
 
 getFieldId ()
 
 setInfo (string $a_info)
 
 getInfo ()
 
 setAlert (string $a_alert)
 
 getAlert ()
 
 setRequired (bool $a_required)
 
 getRequired ()
 
 setDisabled (bool $a_disabled)
 
 getDisabled ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm (ilPropertyFormGUI $a_parentform)
 
 getParentForm ()
 
 setParent (ilFormPropertyGUI $a_val)
 
 getParent ()
 
 getSubForm ()
 
 hideSubForm ()
 
 setHiddenTitle (string $a_val)
 
 getHiddenTitle ()
 
 getItemByPostVar (string $a_post_var)
 Get item by post var. More...
 
 serializeData ()
 
 unserializeData (string $a_data)
 
 setParentTable ($a_val)
 Set parent table. More...
 
 getParentTable ()
 Get parent table. More...
 
 writeToSession ()
 
 clearFromSession ()
 
 readFromSession ()
 
 getHiddenTag (string $a_post_var, string $a_value)
 
 setMulti (bool $a_multi, bool $a_sortable=false, bool $a_addremove=true)
 
 getMulti ()
 
 setMultiValues (array $a_values)
 
 getMultiValues ()
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 
 stripSlashesAddSpaceFallback (string $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...
 
 setRequestParam (string $key, $val)
 This writes the request (aka post) values. More...
 
- Public Member Functions inherited from ilTableFilterItem
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 

Protected Attributes

array $cust_attr = array()
 
array $options = array()
 
Closure $langresolve = null
 
 $value
 
bool $hide_sub = false
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
array $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
array $set_params = []
 
ilTable2GUI $parent_table = null
 
ilFormPropertyGUI $parent_gui = null
 
ilCtrl $ctrl
 
ilLanguage $lng
 
string $type = ""
 
string $title = ""
 
string $postvar = ""
 
string $info = ""
 
string $alert = ""
 
bool $required = false
 
ilPropertyFormGUI $parentform = null
 
string $hidden_title = ""
 
bool $multi = false
 
bool $multi_sortable = false
 
bool $multi_addremove = true
 
array $multi_values = []
 
RequestInterface $request
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
bool $disabled = false
 
ilGlobalTemplateInterface $global_tpl = null
 

Additional Inherited Members

- Static Public Member Functions inherited from ilFormPropertyGUI
static removeProhibitedCharacters (string $a_text)
 Remove prohibited characters see #19159. More...
 
- Protected Member Functions inherited from ilFormPropertyGUI
 symbol ()
 
 setType (string $a_type)
 
 checkParentFormTable ()
 
 getSessionKey ()
 
 getMultiIconsHTML ()
 
 int ($key)
 
 intArray ($key)
 
 str ($key)
 
 raw ($key)
 
 strArray ($key)
 
 arrayArray ($key)
 
 isRequestParamArray (string $key)
 
 getRequestParam (string $key, Refinery\Transformation $t)
 

Detailed Description

This class represents a selection list property in a property form.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file class.ilSelectInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilSelectInputGUI::__construct ( string  $a_title = "",
string  $a_postvar = "" 
)

Definition at line 37 of file class.ilSelectInputGUI.php.

References $DIC, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\lng(), and ilFormPropertyGUI\setType().

40  {
41  global $DIC;
42 
43  $this->lng = $DIC->language();
44  parent::__construct($a_title, $a_postvar);
45  $this->setType("select");
46  }
global $DIC
Definition: shib_login.php:22
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ addCustomAttribute()

ilSelectInputGUI::addCustomAttribute ( string  $a_attr)

Definition at line 143 of file class.ilSelectInputGUI.php.

Referenced by setHideSubForm().

143  : void
144  {
145  $this->cust_attr[] = $a_attr;
146  }
+ Here is the caller graph for this function:

◆ checkInput()

ilSelectInputGUI::checkInput ( )

Definition at line 101 of file class.ilSelectInputGUI.php.

References ilFormPropertyGUI\$lng, $valid, $value, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), ilFormPropertyGUI\getMulti(), getOptions(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), ilFormPropertyGUI\setAlert(), ilFormPropertyGUI\str(), ilFormPropertyGUI\strArray(), and ilLanguage\txt().

101  : bool
102  {
103  $lng = $this->lng;
104 
105  $valid = true;
106  if (!$this->getMulti()) {
107  if ($this->getRequired() && trim($this->str($this->getPostVar())) == "") {
108  $valid = false;
109  } elseif (!array_key_exists($this->str($this->getPostVar()), $this->getOptions())) {
110  $this->setAlert($lng->txt('msg_invalid_post_input'));
111  return false;
112  }
113  } else {
114  $values = $this->strArray($this->getPostVar());
115  foreach ($values as $value) {
116  if (!array_key_exists($value, $this->getOptions())) {
117  $this->setAlert($lng->txt('msg_invalid_post_input'));
118  return false;
119  }
120  }
121  if ($this->getRequired() && !trim(implode("", $values))) {
122  $valid = false;
123  }
124  }
125  if (!$valid) {
126  $this->setAlert($lng->txt("msg_input_is_required"));
127  return false;
128  }
129  return $this->checkSubItemsInput();
130  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
$valid
+ Here is the call graph for this function:

◆ getCustomAttributes()

ilSelectInputGUI::getCustomAttributes ( )

Definition at line 148 of file class.ilSelectInputGUI.php.

References $cust_attr.

Referenced by render().

148  : array
149  {
150  return $this->cust_attr;
151  }
+ Here is the caller graph for this function:

◆ getInput()

ilSelectInputGUI::getInput ( )
Returns
string|string[]

Definition at line 135 of file class.ilSelectInputGUI.php.

References ilFormPropertyGUI\getMulti(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\str(), and ilFormPropertyGUI\strArray().

136  {
137  if (!$this->getMulti()) {
138  return $this->str($this->getPostVar());
139  }
140  return $this->strArray($this->getPostVar());
141  }
+ Here is the call graph for this function:

◆ getOptions()

ilSelectInputGUI::getOptions ( )

Definition at line 53 of file class.ilSelectInputGUI.php.

Referenced by checkInput(), getOptionsLangAttribute(), and render().

53  : array
54  {
55  return $this->options ?: array();
56  }
+ Here is the caller graph for this function:

◆ getOptionsLangAttribute()

ilSelectInputGUI::getOptionsLangAttribute (   $key)

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

References getOptions().

63  : string
64  {
65  return $this->langresolve($this->getOptions(), $key);
66  }
+ Here is the call graph for this function:

◆ getTableFilterHTML()

ilSelectInputGUI::getTableFilterHTML ( )

Get input item HTML to be inserted into table filters.

Implements ilTableFilterItem.

Definition at line 245 of file class.ilSelectInputGUI.php.

References render().

245  : string
246  {
247  $html = $this->render();
248  return $html;
249  }
+ Here is the call graph for this function:

◆ getToolbarHTML()

ilSelectInputGUI::getToolbarHTML ( )

Get input item HTML to be inserted into ilToolbarGUI.

Implements ilToolbarItem.

Definition at line 251 of file class.ilSelectInputGUI.php.

References render().

251  : string
252  {
253  $html = $this->render("toolbar");
254  return $html;
255  }
+ Here is the call graph for this function:

◆ getValue()

ilSelectInputGUI::getValue ( )

Get Value.

Returns
string|array Value

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

References $value.

Referenced by render().

88  {
89  return $this->value;
90  }
+ Here is the caller graph for this function:

◆ hideSubForm()

ilSelectInputGUI::hideSubForm ( )

Definition at line 273 of file class.ilSelectInputGUI.php.

273  : bool
274  {
275  return $this->hide_sub;
276  }

◆ insert()

ilSelectInputGUI::insert ( ilTemplate  $a_tpl)

Definition at line 238 of file class.ilSelectInputGUI.php.

References ilTemplate\parseCurrentBlock(), render(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

238  : void
239  {
240  $a_tpl->setCurrentBlock("prop_generic");
241  $a_tpl->setVariable("PROP_GENERIC", $this->render());
242  $a_tpl->parseCurrentBlock();
243  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ render()

ilSelectInputGUI::render (   $a_mode = "")

Definition at line 153 of file class.ilSelectInputGUI.php.

References Vendor\Package\$f, $lang, $langresolve, ilFormPropertyGUI\$postvar, $value, getCustomAttributes(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getHiddenTag(), ilFormPropertyGUI\getMulti(), ilFormPropertyGUI\getMultiIconsHTML(), ilFormPropertyGUI\getMultiValues(), getOptions(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), ilFormPropertyGUI\getTitle(), getValue(), and ilLegacyFormElementsUtil\prepareFormOutput().

Referenced by getTableFilterHTML(), getToolbarHTML(), and insert().

153  : string
154  {
155  $sel_value = "";
156  $tpl = new ilTemplate("tpl.prop_select.html", true, true, "components/ILIAS/Form");
157 
158  foreach ($this->getCustomAttributes() as $attr) {
159  $tpl->setCurrentBlock('cust_attr');
160  $tpl->setVariable('CUSTOM_ATTR', $attr);
161  $tpl->parseCurrentBlock();
162  }
163 
164  if ($this->getRequired()) {
165  $tpl->setCurrentBlock('required_attribute');
166  $tpl->setVariable('REQUIRED', 'required');
167  $tpl->parseCurrentBlock();
168  }
169 
170  // determine value to select. Due to accessibility reasons we
171  // should always select a value (per default the first one)
172  $first = true;
173  foreach ($this->getOptions() as $option_value => $option_text) {
174  if ($first) {
175  $sel_value = $option_value;
176  }
177  $first = false;
178  if ((string) $option_value == (string) $this->getValue()) {
179  $sel_value = $option_value;
180  }
181  }
182  foreach ($this->getOptions() as $option_value => $option_text) {
183  $tpl->setCurrentBlock("prop_select_option");
184  $tpl->setVariable("VAL_SELECT_OPTION", ilLegacyFormElementsUtil::prepareFormOutput((string) $option_value));
185  if ((string) $sel_value == (string) $option_value) {
186  $tpl->setVariable(
187  "CHK_SEL_OPTION",
188  ' selected="selected"'
189  );
190  }
191  $tpl->setVariable("TXT_SELECT_OPTION", $option_text);
192 
193  if ($this->langresolve) {
195  $lang = $f($this->getOptions(), $option_value);
196  $tpl->setVariable("OPTION_LANG", ' lang="' . $lang . '"');
197  }
198 
199  $tpl->parseCurrentBlock();
200  }
201  $tpl->setVariable("ID", $this->getFieldId());
202 
203  $postvar = $this->getPostVar();
204  if ($this->getMulti() && substr($postvar, -2) != "[]") {
205  $postvar .= "[]";
206  }
207 
208  $tpl->setVariable("POST_VAR", $postvar);
209  if ($this->getDisabled()) {
210  if ($this->getMulti()) {
211  $value = $this->getMultiValues();
212  $hidden = "";
213  if (is_array($value)) {
214  foreach ($value as $item) {
215  $hidden .= $this->getHiddenTag($postvar, $item);
216  }
217  }
218  } else {
219  $hidden = $this->getHiddenTag($postvar, (string) $this->getValue());
220  }
221  if ($hidden) {
222  $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
223  $tpl->setVariable("HIDDEN_INPUT", $hidden);
224  }
225  }
226 
227  // multi icons
228  if ($this->getMulti() && !$a_mode && !$this->getDisabled()) {
229  $tpl->touchBlock("inline_in_bl");
230  $tpl->setVariable("MULTI_ICONS", $this->getMultiIconsHTML());
231  }
232 
233  $tpl->setVariable("ARIA_LABEL", ilLegacyFormElementsUtil::prepareFormOutput($this->getTitle()));
234 
235  return $tpl->get();
236  }
static prepareFormOutput($a_str, bool $a_strip=false)
getHiddenTag(string $a_post_var, string $a_value)
$lang
Definition: xapiexit.php:25
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setHideSubForm()

ilSelectInputGUI::setHideSubForm ( bool  $a_value,
?string  $a_condition = null 
)

Set initial sub form visibility, optionally add dynamic value-based condition.

Definition at line 260 of file class.ilSelectInputGUI.php.

References addCustomAttribute(), and ilFormPropertyGUI\getFieldId().

263  : void {
264  $this->hide_sub = $a_value;
265 
266  if ($a_condition) {
267  $this->addCustomAttribute('onchange="if(this.value ' . $a_condition . ')' .
268  ' { il.Form.showSubForm(\'subform_' . $this->getFieldId() . '\', \'il_prop_cont_' . $this->getFieldId() . '\'); }' .
269  ' else { il.Form.hideSubForm(\'subform_' . $this->getFieldId() . '\'); };"');
270  }
271  }
addCustomAttribute(string $a_attr)
+ Here is the call graph for this function:

◆ setOptions()

ilSelectInputGUI::setOptions ( array  $a_options)

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

Referenced by FormMailCodesGUI\__construct(), ilMemberAgreementGUI\addCustomFields(), ilMMSubItemTableGUI\addFilterItems(), ilPersonalSkillsFilterGUI\addToToolbar(), ilDidacticTemplateGUI\appendToolbarSwitch(), ilPersonalSkillsGUI\assignMaterials(), ilTestSkillEvaluationToolbarGUI\build(), ilDclPluginFieldRepresentation\buildFieldCreationInput(), ilDclCopyFieldRepresentation\buildFieldCreationInput(), ilDclReferenceFieldRepresentation\buildFieldCreationInput(), ilSurveyParticipantsGUI\codesObject(), ilSurveyEvaluationGUI\competenceEval(), ilSurveyEditorGUI\copyQuestionsToPoolObject(), ilSessionStatisticsGUI\current(), ilPCLoginPageElementGUI\edit(), ilContentStyleSettingsGUI\edit(), ilPCTableGUI\editCellAlignment(), ilObjWikiGUI\editImportantPagesObject(), ilObjHelpSettingsGUI\editSettings(), ilPDNewsBlockGUI\editSettings(), ilObjAuthSettingsGUI\getApacheAuthSettingsForm(), ilUserStartingPointGUI\getCalenderSubInputs(), ilObjLTIAdministrationGUI\getConsumerForm(), ilUserStartingPointGUI\getCreateFormSpecificInputs(), ilPCMediaObjectEditorGUI\getEditorElements(), ilExerciseManagementGUI\getEvaluationModalForm(), ilObjMailGUI\getExternalSettingsForm(), ilObjMailGUI\getGeneralSettingsForm(), ilSamlSettingsGUI\getIdpSettingsForm(), ilObjExternalToolsSettingsGUI\getMapsForm(), ilMultilingualismGUI\getMultiLangForm(), ilUserProfile\getRolesInput(), ilObjNewsSettingsGUI\getSettingsForm(), ilObjLearningResourcesSettingsGUI\getSettingsForm(), ilImageMapEditorGUI\getToolbar(), ilExAssignmentEditorGUI\getTypeDropdown(), ilLPTableBaseGUI\initBaseFilter(), ilECSSettingsGUI\initCategoryMappingForm(), ilPCDataTableGUI\initCellPropertiesForm(), ilStyleCharacteristicGUI\initCharacteristicForm(), ilContSkillAdminGUI\initCompetenceAssignmentForm(), ilObjCmiXapiGUI\initCreateForm(), ilObjSAHSLearningModuleGUI\initCreateForm(), ilAdvancedMDTranslationGUI\initCreateTranslationForm(), ilPCDataTableGUI\initCreationForm(), ilPCFileListGUI\initEditForm(), ilPDNewsTableGUI\initFilter(), ilLTIConsumerGradeSynchronizationTableGUI\initFilter(), ilRoleAssignmentTableGUI\initFilter(), ilBuddySystemRelationsTableGUI\initFilter(), ilLPObjectStatisticsTypesTableGUI\initFilter(), ilLanguageExtTableGUI\initFilter(), ilSurveyQuestionbrowserTableGUI\initFilter(), ilMStListCoursesTableGUI\initFilter(), ilMStShowUserCoursesTableGUI\initFilter(), ilSurveyQuestionsTableGUI\initFilter(), ilLPObjectStatisticsTableGUI\initFilter(), ilLPObjectStatisticsDailyTableGUI\initFilter(), ilRegistrationCodesTableGUI\initFilter(), ilRoleTableGUI\initFilter(), ilLPObjectStatisticsLPTableGUI\initFilter(), ilSessionMaterialsTableGUI\initFilter(), ilMediaPoolTableGUI\initFilter(), ilQuestionBrowserTableGUI\initFilter(), ilUserTableGUI\initFilter(), ilLTIConsumerProviderTableGUI\initFilter(), ilExerciseManagementGUI\initFilter(), ilPCAMDPageListGUI\initForm(), ilPCResourcesGUI\initForm(), ilPCMapGUI\initForm(), ilPCTabsGUI\initForm(), ilSkillTemplateReferenceGUI\initForm(), ilLDAPSettingsGUI\initForm(), ilObjUserGUI\initForm(), ilECSMappingSettingsGUI\initFormCSettings(), ilOrgUnitPositionFormGUI\initFormElements(), ilCASSettingsGUI\initFormSettings(), ilObjCalendarSettingsGUI\initFormSettings(), ilObjLoggingSettingsGUI\initFormSettings(), ilObjAwarenessAdministrationGUI\initFormSettings(), ilPersonalSettingsGUI\initGeneralSettingsForm(), ilPCListGUI\initListForm(), ilLTIProviderObjectSettingGUI\initObjectSettingsForm(), ilObjSCORMLearningModuleGUI\initPropertiesForm(), ilObjSCORM2004LearningModuleGUI\initPropertiesForm(), ilPCTableGUI\initPropertiesForm(), ilObjContentObjectGUI\initPropertiesForm(), ilCalendarUserSettingsGUI\initSettingsForm(), ilECSSettingsGUI\initSettingsForm(), ilObjTaxonomyGUI\initSettingsForm(), ilObjectContentStyleSettingsGUI\initStylePropertiesForm(), ilStyleCharacteristicGUI\initTagStyleForm(), ilObjStyleSheetGUI\initTemplateGenerationForm(), ilMediaPoolImportGUI\initTranslationImportForm(), ilLMImportGUI\initTranslationImportForm(), ilPCQuestionGUI\insert(), ilContactGUI\inviteToChatForm(), ilFileSystemGUI\listFiles(), ilContSkillAdminGUI\listProfiles(), ilWikiPageTemplateGUI\listTemplates(), ilBadgeManagementGUI\listUsers(), ilSessionStatisticsGUI\long(), ilExerciseManagementGUI\membersObject(), ilObjSCORMLearningModuleGUI\newModuleVersion(), ilSCORMTrackingItemsPerScoFilterGUI\parse(), ilSCORMTrackingItemsPerUserFilterGUI\parse(), ilSCORM2004TrackingItemsPerUserFilterGUI\parse(), ilSCORM2004TrackingItemsPerScoFilterGUI\parse(), assClozeTestGUI\populateGapFormPart(), assKprimChoiceGUI\populateQuestionSpecificFormPart(), assOrderingQuestionGUI\populateQuestionSpecificFormPart(), assClozeTestGUI\populateQuestionSpecificFormPart(), assTextSubsetGUI\populateQuestionSpecificFormPart(), assMatchingQuestionGUI\populateQuestionSpecificFormPart(), assTextQuestionGUI\populateQuestionSpecificFormPart(), ilSurveyEditorGUI\questionsObject(), assFormulaQuestionGUI\resetSavedPreviewSession(), ilObjOrgUnitSettingsFormGUI\saveObject(), ilPersonalSkillsGUI\selfEvaluation(), ilSurveyEditorGUI\setBrowseForQuestionsSubtabs(), ilObjMediaObjectGUI\setPropertiesSubTabs(), ilObjCertificateSettingsGUI\settings(), ilSessionStatisticsGUI\short(), ilObjContentObjectGUI\showExportIDsOverview(), ilExerciseManagementGUI\showParticipantObject(), ilObjGlossaryGUI\showToolbarForStandard(), ilObjContentObjectGUI\showTooltipList(), ilExcCriteriaGUI\view(), and ilWikiStatGUI\viewToolbar().

48  : void
49  {
50  $this->options = $a_options;
51  }
+ Here is the caller graph for this function:

◆ setOptionsLangAttribute()

ilSelectInputGUI::setOptionsLangAttribute ( \Closure  $langresolve)

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

References $langresolve.

58  : void
59  {
60  $this->langresolve = $langresolve;
61  }

◆ setValue()

ilSelectInputGUI::setValue (   $a_value)

Set Value.

Parameters
string | array$a_valueValue

Definition at line 73 of file class.ilSelectInputGUI.php.

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

Referenced by ilUserProfile\getCountryInput(), ilUserProfile\getLanguageInput(), ilCalendarCategoryGUI\getSearchToolbar(), ilECSSettingsGUI\initCategoryMappingForm(), ilObjCourseGUI\initEditForm(), ilPCListGUI\initListForm(), ilECSSettingsGUI\initMappingsForm(), ilGlossaryPresentationGUI\initPrintViewSelectionForm(), ilOpenIdConnectSettingsGUI\initSettingsForm(), ilTaxAssignInputGUI\setCurrentValues(), setValueByArray(), and ilRegistrationGUI\showCustomFields().

73  : void
74  {
75  if ($this->getMulti() && is_array($a_value)) {
76  $this->setMultiValues($a_value);
77  $a_value = array_shift($a_value);
78  }
79  $this->value = $a_value;
80  }
setMultiValues(array $a_values)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValueByArray()

ilSelectInputGUI::setValueByArray ( array  $a_values)

Definition at line 93 of file class.ilSelectInputGUI.php.

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

93  : void
94  {
95  $this->setValue($a_values[$this->getPostVar()] ?? "");
96  foreach ($this->getSubItems() as $item) {
97  $item->setValueByArray($a_values);
98  }
99  }
setValue($a_value)
Set Value.
+ Here is the call graph for this function:

Field Documentation

◆ $cust_attr

array ilSelectInputGUI::$cust_attr = array()
protected

Definition at line 28 of file class.ilSelectInputGUI.php.

Referenced by getCustomAttributes().

◆ $hide_sub

bool ilSelectInputGUI::$hide_sub = false
protected

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

◆ $langresolve

Closure ilSelectInputGUI::$langresolve = null
protected

Definition at line 30 of file class.ilSelectInputGUI.php.

Referenced by render(), and setOptionsLangAttribute().

◆ $options

array ilSelectInputGUI::$options = array()
protected

◆ $value

ilSelectInputGUI::$value
protected

Definition at line 34 of file class.ilSelectInputGUI.php.

Referenced by checkInput(), getValue(), and render().


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