ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilTextInputGUI Class Reference

This class represents a text property in a property form. More...

+ Inheritance diagram for ilTextInputGUI:
+ Collaboration diagram for ilTextInputGUI:

Public Member Functions

 __construct (string $a_title="", string $a_postvar="")
 
 setValue ($a_value)
 
 getValue ()
 
 setValidationFailureMessage (string $a_msg)
 
 getValidationFailureMessage ()
 
 setValidationRegexp (string $a_value)
 
 getValidationRegexp ()
 
 setMaxLength (?int $a_maxlength)
 
 getMaxLength ()
 
 setSize (int $a_size)
 
 setInlineStyle (string $a_style)
 
 getInlineStyle ()
 
 setCssClass (string $a_class)
 
 getCssClass ()
 
 setValueByArray (array $a_values)
 
 getSize ()
 
 setSuffix (string $a_value)
 
 getSuffix ()
 
 setInputType (string $a_type)
 set input type More...
 
 getInputType ()
 
 setSubmitFormOnEnter (bool $a_val)
 
 getSubmitFormOnEnter ()
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getInput ()
 
 getDataSource ()
 
 setDataSource (string $href, ?string $a_delimiter=null)
 
 setDataSourceSubmitOnSelection (bool $a_stat)
 
 getDataSourceSubmitOnSelection ()
 
 setDataSourceSubmitUrl (string $a_url)
 
 getDataSourceSubmitUrl ()
 
 setMultiValues (array $a_values)
 
 render (string $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...
 
 setDisableHtmlAutoComplete (bool $autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
 getPostValueForComparison ()
 
- 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)
 Get item by post var. More...
 
- 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
 getTableFilterHTML ()
 Get input item HTML to be inserted into table filters. More...
 
 getTableFilterLabelFor ()
 Get label "for" attribute value. More...
 
 getToolbarHTML ()
 Get input item HTML to be inserted into ilToolbarGUI. More...
 

Protected Attributes

 $value = null
 
int $maxlength = 200
 
int $size = 40
 
string $validationRegexp = ""
 
string $validationFailureMessage = ''
 
string $suffix = ""
 
string $style_css = ""
 
string $css_class = ""
 
string $ajax_datasource = ""
 
string $ajax_datasource_delimiter = null
 
bool $ajax_datasource_commit = false
 
string $ajax_datasource_commit_url = ""
 
bool $submit_form_on_enter = false
 
bool $autocomplete_disabled = false
 
string $input_type = ""
 
- 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 text property in a property form.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de
Deprecated:
12 This component will be removed with ILIAS 12

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

Constructor & Destructor Documentation

◆ __construct()

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

Reimplemented from ilFormPropertyGUI.

Reimplemented in ilColorPickerInputGUI, ilFormulaInputGUI, ilRegExpInputGUI, ilSelectBuilderInputGUI, ilTextWizardInputGUI, ilUriInputGUI, ilTRBLColorPickerInputGUI, ilCategoryWizardInputGUI, and ilMatrixRowWizardInputGUI.

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

52 {
53 global $DIC;
54 $this->lng = $DIC->language();
55 parent::__construct($a_title, $a_postvar);
56 $this->setInputType("text");
57 $this->setType("text");
58 $this->validationRegexp = "";
59 }
setInputType(string $a_type)
set input type
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
global $DIC
Definition: shib_login.php:26

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

+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilTextInputGUI::checkInput ( )

Check input, strip slashes etc.

set alert, if input is not ok.

Reimplemented from ilFormPropertyGUI.

Reimplemented in ilDclTextInputGUI, ilColorPickerInputGUI, ilFormulaInputGUI, ilRegExpInputGUI, ilSelectBuilderInputGUI, ilTextWizardInputGUI, ilUriInputGUI, ilLuceneQueryInputGUI, ilTRBLColorPickerInputGUI, ilCategoryWizardInputGUI, ilMatrixRowWizardInputGUI, ilAnswerWizardInputGUI, ilErrorTextWizardInputGUI, ilEssayKeywordWizardInputGUI, ilKprimChoiceWizardInputGUI, ilMatchingPairWizardInputGUI, ilMatchingWizardInputGUI, ilMultipleChoiceWizardInputGUI, ilSingleChoiceWizardInputGUI, ilAssAnswerCorrectionsInputGUI, ilAssClozeTestCombinationVariantsInputGUI, ilAssErrorTextCorrectionsInputGUI, ilAssLongmenuCorrectionsInputGUI, ilAssMatchingPairCorrectionsInputGUI, ilAssMultipleChoiceCorrectionsInputGUI, ilAssSingleChoiceCorrectionsInputGUI, ilIdentifiedMultiValuesInputGUI, and ilKprimChoiceCorrectionsInputGUI.

Definition at line 180 of file class.ilTextInputGUI.php.

180 : bool
181 {
183
184 if (!$this->getMulti()) {
185 if ($this->getRequired() && trim($this->str($this->getPostVar())) == "") {
186 $this->setAlert($lng->txt("msg_input_is_required"));
187 return false;
188 } elseif (strlen($this->getValidationRegexp())) {
189 if (!preg_match($this->getValidationRegexp(), $this->str($this->getPostVar()))) {
190 $this->setAlert(
192 $lng->txt('msg_wrong_format')
193 );
194 return false;
195 }
196 }
197 } else {
198 if ($this->getRequired() &&
199 !trim(implode("", $this->strArray($this->getPostVar())))) {
200 $this->setAlert($lng->txt("msg_input_is_required"));
201 return false;
202 } elseif (strlen($this->getValidationRegexp())) {
203 $reg_valid = true;
204 foreach ($this->strArray($this->getPostVar()) as $value) {
205 if (!preg_match($this->getValidationRegexp(), $value)) {
206 $reg_valid = false;
207 break;
208 }
209 }
210 if (!$reg_valid) {
211 $this->setAlert(
213 $lng->txt('msg_wrong_format')
214 );
215 return false;
216 }
217 }
218 }
219
220 return $this->checkSubItemsInput();
221 }
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...

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

+ Here is the call graph for this function:

◆ getCssClass()

ilTextInputGUI::getCssClass ( )

Definition at line 131 of file class.ilTextInputGUI.php.

131 : string
132 {
133 return $this->css_class;
134 }

References $css_class.

◆ getDataSource()

ilTextInputGUI::getDataSource ( )

Definition at line 234 of file class.ilTextInputGUI.php.

234 : string
235 {
237 }

References $ajax_datasource.

◆ getDataSourceSubmitOnSelection()

ilTextInputGUI::getDataSourceSubmitOnSelection ( )

Definition at line 252 of file class.ilTextInputGUI.php.

252 : bool
253 {
255 }

◆ getDataSourceSubmitUrl()

ilTextInputGUI::getDataSourceSubmitUrl ( )

Definition at line 262 of file class.ilTextInputGUI.php.

262 : string
263 {
265 }
string $ajax_datasource_commit_url

◆ getInlineStyle()

ilTextInputGUI::getInlineStyle ( )

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

121 : string
122 {
123 return $this->style_css;
124 }

References $style_css.

◆ getInput()

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

Reimplemented in ilColorPickerInputGUI, ilFormulaInputGUI, ilRegExpInputGUI, ilSelectBuilderInputGUI, ilTextWizardInputGUI, ilTRBLColorPickerInputGUI, ilCategoryWizardInputGUI, ilMatrixRowWizardInputGUI, ilLogicalAnswerComparisonExpressionInputGUI, and ilIdentifiedMultiValuesInputGUI.

Definition at line 226 of file class.ilTextInputGUI.php.

227 {
228 if (!$this->getMulti()) {
229 return $this->str($this->getPostVar());
230 }
231 return $this->strArray($this->getPostVar());
232 }

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

Referenced by ilUriInputGUI\checkInput().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInputType()

ilTextInputGUI::getInputType ( )

Definition at line 165 of file class.ilTextInputGUI.php.

165 : string
166 {
167 return $this->input_type;
168 }

References $input_type.

◆ getMaxLength()

◆ getPostValueForComparison()

ilTextInputGUI::getPostValueForComparison ( )

Definition at line 442 of file class.ilTextInputGUI.php.

442 : string
443 {
444 return $this->getInput();
445 }

◆ getSize()

◆ getSubmitFormOnEnter()

ilTextInputGUI::getSubmitFormOnEnter ( )

Definition at line 175 of file class.ilTextInputGUI.php.

175 : bool
176 {
178 }

References $submit_form_on_enter.

◆ getSuffix()

ilTextInputGUI::getSuffix ( )

Definition at line 151 of file class.ilTextInputGUI.php.

151 : string
152 {
153 return $this->suffix;
154 }

References $suffix.

◆ getTableFilterHTML()

ilTextInputGUI::getTableFilterHTML ( )

Get input item HTML to be inserted into table filters.

Implements ilTableFilterItem.

Definition at line 420 of file class.ilTextInputGUI.php.

420 : string
421 {
422 $html = $this->render();
423 return $html;
424 }
render(string $a_mode="")

◆ getToolbarHTML()

ilTextInputGUI::getToolbarHTML ( )

Get input item HTML to be inserted into ilToolbarGUI.

Implements ilToolbarItem.

Definition at line 426 of file class.ilTextInputGUI.php.

426 : string
427 {
428 $html = $this->render("toolbar");
429 return $html;
430 }

◆ getValidationFailureMessage()

ilTextInputGUI::getValidationFailureMessage ( )

Definition at line 86 of file class.ilTextInputGUI.php.

86 : string
87 {
89 }

References $validationFailureMessage.

Referenced by checkInput().

+ Here is the caller graph for this function:

◆ getValidationRegexp()

ilTextInputGUI::getValidationRegexp ( )

Definition at line 96 of file class.ilTextInputGUI.php.

96 : string
97 {
99 }

References $validationRegexp.

Referenced by ilSelectBuilderInputGUI\checkInput(), checkInput(), ilTextWizardInputGUI\checkInput(), and ilMultipleTextsInputGUI\onCheckInput().

+ Here is the caller graph for this function:

◆ getValue()

ilTextInputGUI::getValue ( )
Returns
array|string

Reimplemented in ilIdentifiedMultiValuesInputGUI.

Definition at line 76 of file class.ilTextInputGUI.php.

77 {
78 return $this->value;
79 }

References $value.

Referenced by ilColorPickerInputGUI\insert(), and ilTRBLColorPickerInputGUI\insert().

+ Here is the caller graph for this function:

◆ insert()

◆ isHtmlAutoCompleteDisabled()

ilTextInputGUI::isHtmlAutoCompleteDisabled ( )

Definition at line 437 of file class.ilTextInputGUI.php.

437 : bool
438 {
440 }

◆ render()

ilTextInputGUI::render ( string  $a_mode = "")

Reimplemented in ilTextWizardInputGUI, ilMultipleImagesInputGUI, ilMultipleTextsInputGUI, and ilAssNestedOrderingElementsInputGUI.

Definition at line 278 of file class.ilTextInputGUI.php.

278 : string
279 {
281
282 $tpl = new ilTemplate("tpl.prop_textinput.html", true, true, "components/ILIAS/Form");
283 if (strlen((string) $this->getValue())) {
284 $tpl->setCurrentBlock("prop_text_propval");
285 $tpl->setVariable(
286 "PROPERTY_VALUE",
288 );
289 $tpl->parseCurrentBlock();
290 }
291 if (strlen($this->getInlineStyle())) {
292 $tpl->setCurrentBlock("stylecss");
293 $tpl->setVariable(
294 "CSS_STYLE",
296 );
297 $tpl->parseCurrentBlock();
298 }
299 if (strlen($this->getCssClass())) {
300 $tpl->setCurrentBlock("classcss");
301 $tpl->setVariable('CLASS_CSS', ilLegacyFormElementsUtil::prepareFormOutput((string) $this->getCssClass()));
302 $tpl->parseCurrentBlock();
303 }
304 if ($this->getSubmitFormOnEnter()) {
305 $tpl->touchBlock("submit_form_on_enter");
306 }
307
308 switch ($this->getInputType()) {
309 case 'password':
310 $tpl->setVariable('PROP_INPUT_TYPE', 'password');
311 break;
312 case 'hidden':
313 $tpl->setVariable('PROP_INPUT_TYPE', 'hidden');
314 break;
315 case 'text':
316 default:
317 $tpl->setVariable('PROP_INPUT_TYPE', 'text');
318 }
319 $tpl->setVariable("ID", $this->getFieldId());
320 $tpl->setVariable("SIZE", $this->getSize());
321 if ($this->getMaxLength() != null) {
322 $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
323 }
324 if (strlen($this->getSuffix())) {
325 $tpl->setVariable("INPUT_SUFFIX", $this->getSuffix());
326 }
327
328 $postvar = $this->getPostVar();
329 if ($this->getMulti() && substr($postvar, -2) != "[]") {
330 $postvar .= "[]";
331 }
332
333 $tpl->setVariable("POST_VAR", $postvar);
334 if ($this->getDisabled()) {
335 if ($this->getMulti()) {
336 $value = $this->getMultiValues();
337 $hidden = "";
338 if (is_array($value)) {
339 foreach ($value as $item) {
340 $hidden .= $this->getHiddenTag($postvar, $item);
341 }
342 }
343 } else {
344 $hidden = $this->getHiddenTag($postvar, $this->getValue());
345 }
346 if ($hidden) {
347 $tpl->setVariable("HIDDEN_INPUT", $hidden);
348 }
349 $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
350 }
351
352 // use autocomplete feature?
353 if ($this->getDataSource()) {
354 $tpl->setVariable('AUTOCOMPLETE', 'autocomplete="off"');
355 $this->global_tpl->addJavaScript('assets/js/legacyAutocomplete.js', true, 3);
356 $config = json_encode([
357 'delimiter' => $this->ajax_datasource_delimiter,
358 'dataSource' => $this->ajax_datasource,
359 'submitOnSelection' => $this->ajax_datasource_commit,
360 'submitUrl' => $this->ajax_datasource_commit_url,
361 'autocompleteLength' => 3,
362 'moreText' => $this->lng->txt('autocomplete_more')
363 ]);
364
365 if ($this->multi) {
366 $sel_auto = '[id^="' . $this->getFieldId() . '"]';
367 } else {
368 // use id for autocomplete selector
369 $sel_auto = "#" . $this->getFieldId();
370 }
371
372 $this->global_tpl->addOnLoadCode(
373 "il.LegacyForm.autocomplete.init(document.querySelector(`{$sel_auto}`), {$config});"
374 );
375 }
376
377 if ($a_mode == "toolbar") {
378 // block-inline hack, see: http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
379 // -moz-inline-stack for FF2
380 // zoom 1; *display:inline for IE6 & 7
381 $tpl->setVariable(
382 "STYLE_PAR",
383 'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;'
384 );
385 } else {
386 $tpl->setVariable("STYLE_PAR", '');
387 }
388
389 if ($this->isHtmlAutoCompleteDisabled()) {
390 $tpl->setVariable("AUTOCOMPLETE", "autocomplete=\"off\"");
391 }
392
393 if ($this->getRequired()) {
394 $tpl->setVariable("REQUIRED", "required=\"required\"");
395 }
396
397 // multi icons
398 if ($this->getMulti() && !$a_mode && !$this->getDisabled()) {
399 $tpl->touchBlock("inline_in_bl");
400 $tpl->setVariable("MULTI_ICONS", $this->getMultiIconsHTML());
401 }
402
403 $tpl->setVariable("ARIA_LABEL", ilLegacyFormElementsUtil::prepareFormOutput($this->getTitle()));
404 if ($this->getInfo() !== '') {
405 $tpl->setVariable('DESCRIBED_BY_FIELD_ID', $this->getFieldId());
406 }
407
408 return $tpl->get();
409 }
getHiddenTag(string $a_post_var, string $a_value)
static prepareFormOutput($a_str, bool $a_strip=false)
special template class to simplify handling of ITX/PEAR

References $lng, ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle(), ILIAS\UI\Implementation\Component\Input\getValue(), ILIAS\Repository\lng(), and ilLegacyFormElementsUtil\prepareFormOutput().

Referenced by ilAssLongmenuCorrectionsInputGUI\insert().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCssClass()

ilTextInputGUI::setCssClass ( string  $a_class)

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

126 : void
127 {
128 $this->css_class = $a_class;
129 }

◆ setDataSource()

ilTextInputGUI::setDataSource ( string  $href,
?string  $a_delimiter = null 
)

Definition at line 239 of file class.ilTextInputGUI.php.

242 : void {
243 $this->ajax_datasource = $href;
244 $this->ajax_datasource_delimiter = $a_delimiter;
245 }

Referenced by ilRoleAutoCompleteInputGUI\__construct(), and ILIAS\LegalDocuments\Table\HistoryTable\userName().

+ Here is the caller graph for this function:

◆ setDataSourceSubmitOnSelection()

ilTextInputGUI::setDataSourceSubmitOnSelection ( bool  $a_stat)

Definition at line 247 of file class.ilTextInputGUI.php.

247 : void
248 {
249 $this->ajax_datasource_commit = $a_stat;
250 }

◆ setDataSourceSubmitUrl()

ilTextInputGUI::setDataSourceSubmitUrl ( string  $a_url)

Definition at line 257 of file class.ilTextInputGUI.php.

257 : void
258 {
259 $this->ajax_datasource_commit_url = $a_url;
260 }

◆ setDisableHtmlAutoComplete()

ilTextInputGUI::setDisableHtmlAutoComplete ( bool  $autocomplete)

Definition at line 432 of file class.ilTextInputGUI.php.

432 : void
433 {
434 $this->autocomplete_disabled = $autocomplete;
435 }

◆ setInlineStyle()

ilTextInputGUI::setInlineStyle ( string  $a_style)

Definition at line 116 of file class.ilTextInputGUI.php.

116 : void
117 {
118 $this->style_css = $a_style;
119 }

◆ setInputType()

ilTextInputGUI::setInputType ( string  $a_type)

set input type

Parameters
string$a_typeinput type password | text

Definition at line 160 of file class.ilTextInputGUI.php.

160 : void
161 {
162 $this->input_type = $a_type;
163 }

Referenced by ilRoleAutoCompleteInputGUI\__construct(), and __construct().

+ Here is the caller graph for this function:

◆ setMaxLength()

ilTextInputGUI::setMaxLength ( ?int  $a_maxlength)

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

101 : void
102 {
103 $this->maxlength = $a_maxlength;
104 }

Referenced by ilMatchingWizardInputGUI\__construct(), ilSingleChoiceWizardInputGUI\__construct(), ilRoleAutoCompleteInputGUI\__construct(), ilCategoryWizardInputGUI\__construct(), and ilMatrixRowWizardInputGUI\__construct().

+ Here is the caller graph for this function:

◆ setMultiValues()

ilTextInputGUI::setMultiValues ( array  $a_values)

Reimplemented from ilFormPropertyGUI.

Reimplemented in ilIdentifiedMultiValuesInputGUI.

Definition at line 267 of file class.ilTextInputGUI.php.

267 : void
268 {
269 foreach ($a_values as $idx => $value) {
270 $a_values[$idx] = trim($value);
271 if ($a_values[$idx] == "") {
272 unset($a_values[$idx]);
273 }
274 }
275 parent::setMultiValues($a_values);
276 }

Referenced by setValue().

+ Here is the caller graph for this function:

◆ setSize()

ilTextInputGUI::setSize ( int  $a_size)

Definition at line 111 of file class.ilTextInputGUI.php.

111 : void
112 {
113 $this->size = $a_size;
114 }

Referenced by ilAnswerWizardInputGUI\__construct(), ilMatchingWizardInputGUI\__construct(), ilMultipleImagesInputGUI\__construct(), ilSingleChoiceWizardInputGUI\__construct(), and ilRoleAutoCompleteInputGUI\__construct().

+ Here is the caller graph for this function:

◆ setSubmitFormOnEnter()

ilTextInputGUI::setSubmitFormOnEnter ( bool  $a_val)

Definition at line 170 of file class.ilTextInputGUI.php.

170 : void
171 {
172 $this->submit_form_on_enter = $a_val;
173 }

◆ setSuffix()

ilTextInputGUI::setSuffix ( string  $a_value)

Definition at line 146 of file class.ilTextInputGUI.php.

146 : void
147 {
148 $this->suffix = $a_value;
149 }

◆ setValidationFailureMessage()

ilTextInputGUI::setValidationFailureMessage ( string  $a_msg)

Definition at line 81 of file class.ilTextInputGUI.php.

81 : void
82 {
83 $this->validationFailureMessage = $a_msg;
84 }

◆ setValidationRegexp()

ilTextInputGUI::setValidationRegexp ( string  $a_value)

Definition at line 91 of file class.ilTextInputGUI.php.

91 : void
92 {
93 $this->validationRegexp = $a_value;
94 }

◆ setValue()

◆ setValueByArray()

ilTextInputGUI::setValueByArray ( array  $a_values)

Reimplemented in ilDclTextInputGUI, ilColorPickerInputGUI, ilSelectBuilderInputGUI, ilSingleChoiceWizardInputGUI, and ilIdentifiedMultiValuesInputGUI.

Definition at line 136 of file class.ilTextInputGUI.php.

136 : void
137 {
138 $this->setValue($a_values[$this->getPostVar()] ?? "");
139 }

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

+ Here is the call graph for this function:

Field Documentation

◆ $ajax_datasource

string ilTextInputGUI::$ajax_datasource = ""
protected

Definition at line 40 of file class.ilTextInputGUI.php.

Referenced by getDataSource().

◆ $ajax_datasource_commit

bool ilTextInputGUI::$ajax_datasource_commit = false
protected

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

◆ $ajax_datasource_commit_url

string ilTextInputGUI::$ajax_datasource_commit_url = ""
protected

Definition at line 43 of file class.ilTextInputGUI.php.

◆ $ajax_datasource_delimiter

string ilTextInputGUI::$ajax_datasource_delimiter = null
protected

Definition at line 41 of file class.ilTextInputGUI.php.

◆ $autocomplete_disabled

bool ilTextInputGUI::$autocomplete_disabled = false
protected

Definition at line 46 of file class.ilTextInputGUI.php.

◆ $css_class

string ilTextInputGUI::$css_class = ""
protected

Definition at line 39 of file class.ilTextInputGUI.php.

Referenced by getCssClass().

◆ $input_type

string ilTextInputGUI::$input_type = ""
protected

Definition at line 47 of file class.ilTextInputGUI.php.

Referenced by getInputType().

◆ $maxlength

int ilTextInputGUI::$maxlength = 200
protected

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

Referenced by getMaxLength().

◆ $size

int ilTextInputGUI::$size = 40
protected

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

Referenced by getSize().

◆ $style_css

string ilTextInputGUI::$style_css = ""
protected

Definition at line 38 of file class.ilTextInputGUI.php.

Referenced by getInlineStyle().

◆ $submit_form_on_enter

bool ilTextInputGUI::$submit_form_on_enter = false
protected

Definition at line 44 of file class.ilTextInputGUI.php.

Referenced by getSubmitFormOnEnter().

◆ $suffix

◆ $validationFailureMessage

string ilTextInputGUI::$validationFailureMessage = ''
protected

Definition at line 36 of file class.ilTextInputGUI.php.

Referenced by getValidationFailureMessage().

◆ $validationRegexp

string ilTextInputGUI::$validationRegexp = ""
protected

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

Referenced by getValidationRegexp().

◆ $value

ilTextInputGUI::$value = null
protected

Definition at line 32 of file class.ilTextInputGUI.php.

Referenced by ilSingleChoiceWizardInputGUI\checkAnswersInput(), ilRegExpInputGUI\checkInput(), ilSelectBuilderInputGUI\checkInput(), checkInput(), ilTextWizardInputGUI\checkInput(), ilTRBLColorPickerInputGUI\checkInput(), ilAnswerWizardInputGUI\checkInput(), ilMatchingPairWizardInputGUI\checkInput(), ilMatchingWizardInputGUI\checkInput(), ilMultipleImagesInputGUI\fetchContentImageSourceFromValue(), ilMultipleImagesInputGUI\fetchContentImageTitleFromValue(), ilMultipleTextsInputGUI\fetchContentTextFromValue(), ilColorPickerInputGUI\getInput(), getValue(), ilSelectBuilderInputGUI\insert(), ilTRBLColorPickerInputGUI\insert(), ilAnswerWizardInputGUI\insert(), ilErrorTextWizardInputGUI\insert(), ilEssayKeywordWizardInputGUI\insert(), ilKprimChoiceWizardInputGUI\insert(), ilMatchingWizardInputGUI\insert(), ilMultipleChoiceWizardInputGUI\insert(), ilSingleChoiceWizardInputGUI\insert(), ilAssAnswerCorrectionsInputGUI\insert(), ilAssErrorTextCorrectionsInputGUI\insert(), ilAssMultipleChoiceCorrectionsInputGUI\insert(), ilAssSingleChoiceCorrectionsInputGUI\insert(), ilTextWizardInputGUI\render(), ilMultipleImagesInputGUI\render(), ilMultipleTextsInputGUI\render(), ilCategoryWizardInputGUI\setValue(), ilMatrixRowWizardInputGUI\setValue(), ilAnswerWizardInputGUI\setValue(), ilEssayKeywordWizardInputGUI\setValue(), ilKprimChoiceWizardInputGUI\setValue(), ilMatchingWizardInputGUI\setValue(), ilMultipleChoiceWizardInputGUI\setValue(), ilSingleChoiceWizardInputGUI\setValue(), ilAssAnswerCorrectionsInputGUI\setValue(), ilAssClozeTestCombinationVariantsInputGUI\setValue(), ilAssMatchingPairCorrectionsInputGUI\setValue(), ilAssMultipleChoiceCorrectionsInputGUI\setValue(), ilAssSingleChoiceCorrectionsInputGUI\setValue(), ilKprimChoiceCorrectionsInputGUI\setValue(), ilMultipleImagesInputGUI\valueHasContentImageSource(), ilMultipleImagesInputGUI\valueHasContentImageTitle(), ilAssOrderingTextsInputGUI\valueHasContentText(), and ilMultipleTextsInputGUI\valueHasContentText().


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