ILIAS  trunk Revision v11.0_alpha-2638-g80c1d007f79
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 ()
 
 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)
 
- 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

 $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 = "" 
)

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

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

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
global $DIC
Definition: shib_login.php:26
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilTextInputGUI::checkInput ( )

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

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

180  : bool
181  {
182  $lng = $this->lng;
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(
191  $this->getValidationFailureMessage() ?:
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(
212  $this->getValidationFailureMessage() ?:
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...
+ Here is the call graph for this function:

◆ getCssClass()

ilTextInputGUI::getCssClass ( )

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

References $css_class.

Referenced by render().

131  : string
132  {
133  return $this->css_class;
134  }
+ Here is the caller graph for this function:

◆ getDataSource()

ilTextInputGUI::getDataSource ( )

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

References $ajax_datasource.

Referenced by render().

234  : string
235  {
236  return $this->ajax_datasource;
237  }
+ Here is the caller graph for this function:

◆ getDataSourceSubmitOnSelection()

ilTextInputGUI::getDataSourceSubmitOnSelection ( )

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

References $ajax_datasource_commit.

252  : bool
253  {
255  }

◆ getDataSourceSubmitUrl()

ilTextInputGUI::getDataSourceSubmitUrl ( )

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

References $ajax_datasource_commit_url.

262  : string
263  {
265  }
string $ajax_datasource_commit_url

◆ getInlineStyle()

ilTextInputGUI::getInlineStyle ( )

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

References $style_css.

Referenced by render().

121  : string
122  {
123  return $this->style_css;
124  }
+ Here is the caller graph for this function:

◆ getInput()

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

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

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

Referenced by ilUriInputGUI\checkInput(), and getPostValueForComparison().

227  {
228  if (!$this->getMulti()) {
229  return $this->str($this->getPostVar());
230  }
231  return $this->strArray($this->getPostVar());
232  }
+ 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.

References $input_type.

Referenced by render().

165  : string
166  {
167  return $this->input_type;
168  }
+ Here is the caller graph for this function:

◆ getMaxLength()

◆ getPostValueForComparison()

ilTextInputGUI::getPostValueForComparison ( )

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

References getInput().

442  : string
443  {
444  return $this->getInput();
445  }
+ Here is the call graph for this function:

◆ getSize()

◆ getSubmitFormOnEnter()

ilTextInputGUI::getSubmitFormOnEnter ( )

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

References $submit_form_on_enter.

Referenced by render().

175  : bool
176  {
178  }
+ Here is the caller graph for this function:

◆ getSuffix()

ilTextInputGUI::getSuffix ( )

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

References $suffix.

Referenced by render().

151  : string
152  {
153  return $this->suffix;
154  }
+ Here is the caller graph for this function:

◆ getTableFilterHTML()

ilTextInputGUI::getTableFilterHTML ( )

Get input item HTML to be inserted into table filters.

Implements ilTableFilterItem.

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

References render().

420  : string
421  {
422  $html = $this->render();
423  return $html;
424  }
render(string $a_mode="")
+ Here is the call graph for this function:

◆ getToolbarHTML()

ilTextInputGUI::getToolbarHTML ( )

Get input item HTML to be inserted into ilToolbarGUI.

Implements ilToolbarItem.

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

References render().

426  : string
427  {
428  $html = $this->render("toolbar");
429  return $html;
430  }
render(string $a_mode="")
+ Here is the call graph for this function:

◆ getValidationFailureMessage()

ilTextInputGUI::getValidationFailureMessage ( )

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

References $validationFailureMessage.

Referenced by checkInput().

86  : string
87  {
89  }
+ Here is the caller graph for this function:

◆ getValidationRegexp()

ilTextInputGUI::getValidationRegexp ( )

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

References $validationRegexp.

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

96  : string
97  {
99  }
+ Here is the caller graph for this function:

◆ getValue()

ilTextInputGUI::getValue ( )
Returns
array|string

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

References $value.

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

77  {
78  return $this->value;
79  }
+ Here is the caller graph for this function:

◆ insert()

ilTextInputGUI::insert ( ilTemplate  $a_tpl)

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

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

411  : void
412  {
413  $html = $this->render();
414 
415  $a_tpl->setCurrentBlock("prop_generic");
416  $a_tpl->setVariable("PROP_GENERIC", $html);
417  $a_tpl->parseCurrentBlock();
418  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:544
render(string $a_mode="")
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ isHtmlAutoCompleteDisabled()

ilTextInputGUI::isHtmlAutoCompleteDisabled ( )

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

References $autocomplete_disabled.

Referenced by render().

437  : bool
438  {
440  }
+ Here is the caller graph for this function:

◆ render()

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

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

References ilFormPropertyGUI\$lng, ilFormPropertyGUI\$postvar, $value, getCssClass(), getDataSource(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getHiddenTag(), ilFormPropertyGUI\getInfo(), getInlineStyle(), getInputType(), getMaxLength(), ilFormPropertyGUI\getMulti(), ilFormPropertyGUI\getMultiIconsHTML(), ilFormPropertyGUI\getMultiValues(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), getSize(), getSubmitFormOnEnter(), getSuffix(), ilFormPropertyGUI\getTitle(), getValue(), isHtmlAutoCompleteDisabled(), ILIAS\Repository\lng(), null, and ilLegacyFormElementsUtil\prepareFormOutput().

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

278  : string
279  {
280  $lng = $this->lng;
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  }
static prepareFormOutput($a_str, bool $a_strip=false)
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
getHiddenTag(string $a_post_var, string $a_value)
+ 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.

Referenced by ilRoleAutoCompleteInputGUI\__construct().

242  : void {
243  $this->ajax_datasource = $href;
244  $this->ajax_datasource_delimiter = $a_delimiter;
245  }
+ 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.

Referenced by assClozeTestGUI\populateNumericGapFormPart().

116  : void
117  {
118  $this->style_css = $a_style;
119  }
+ Here is the caller graph for this function:

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

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

160  : void
161  {
162  $this->input_type = $a_type;
163  }
+ Here is the caller graph for this function:

◆ setMaxLength()

ilTextInputGUI::setMaxLength ( ?int  $a_maxlength)

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

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

101  : void
102  {
103  $this->maxlength = $a_maxlength;
104  }
+ Here is the caller graph for this function:

◆ setMultiValues()

ilTextInputGUI::setMultiValues ( array  $a_values)

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

References $value.

Referenced by setValue().

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

◆ setSize()

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

ilTextInputGUI::setValue (   $a_value)
Parameters
string | array$a_value

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

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

Referenced by ilAdvancedMDRecordTranslations\modifyTranslationInfoForTitle(), ilAdvancedMDFieldTranslations\modifyTranslationInfoForTitle(), and setValueByArray().

64  : void
65  {
66  if ($this->getMulti() && is_array($a_value)) {
67  $this->setMultiValues($a_value);
68  $a_value = array_shift($a_value);
69  }
70  $this->value = $a_value;
71  }
setMultiValues(array $a_values)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValueByArray()

ilTextInputGUI::setValueByArray ( array  $a_values)

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

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

136  : void
137  {
138  $this->setValue($a_values[$this->getPostVar()] ?? "");
139  }
+ 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.

Referenced by getDataSourceSubmitOnSelection().

◆ $ajax_datasource_commit_url

string ilTextInputGUI::$ajax_datasource_commit_url = ""
protected

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

Referenced by getDataSourceSubmitUrl().

◆ $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.

Referenced by isHtmlAutoCompleteDisabled().

◆ $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(), ilKprimChoiceCorrectionsInputGUI\checkInput(), ilRegExpInputGUI\checkInput(), ilSelectBuilderInputGUI\checkInput(), ilTextWizardInputGUI\checkInput(), ilMatchingPairWizardInputGUI\checkInput(), ilTRBLColorPickerInputGUI\checkInput(), ilMatchingWizardInputGUI\checkInput(), checkInput(), ilAnswerWizardInputGUI\checkInput(), ilMultipleImagesInputGUI\fetchContentImageSourceFromValue(), ilMultipleImagesInputGUI\fetchContentImageTitleFromValue(), ilMultipleTextsInputGUI\fetchContentTextFromValue(), ilColorPickerInputGUI\getInput(), getValue(), ilAssSingleChoiceCorrectionsInputGUI\insert(), ilAssErrorTextCorrectionsInputGUI\insert(), ilAssAnswerCorrectionsInputGUI\insert(), ilAssMultipleChoiceCorrectionsInputGUI\insert(), ilEssayKeywordWizardInputGUI\insert(), ilSelectBuilderInputGUI\insert(), ilKprimChoiceWizardInputGUI\insert(), ilTRBLColorPickerInputGUI\insert(), ilMultipleChoiceWizardInputGUI\insert(), ilErrorTextWizardInputGUI\insert(), ilAnswerWizardInputGUI\insert(), ilMatchingWizardInputGUI\insert(), ilSingleChoiceWizardInputGUI\insert(), ilTextWizardInputGUI\render(), ilMultipleTextsInputGUI\render(), render(), ilMultipleImagesInputGUI\render(), setMultiValues(), ilEssayKeywordWizardInputGUI\setValue(), ilAssClozeTestCombinationVariantsInputGUI\setValue(), ilKprimChoiceCorrectionsInputGUI\setValue(), ilMultipleChoiceWizardInputGUI\setValue(), ilAssMultipleChoiceCorrectionsInputGUI\setValue(), ilAssSingleChoiceCorrectionsInputGUI\setValue(), ilAssMatchingPairCorrectionsInputGUI\setValue(), ilAssAnswerCorrectionsInputGUI\setValue(), ilAnswerWizardInputGUI\setValue(), ilSingleChoiceWizardInputGUI\setValue(), ilMatrixRowWizardInputGUI\setValue(), ilKprimChoiceWizardInputGUI\setValue(), ilCategoryWizardInputGUI\setValue(), ilMatchingWizardInputGUI\setValue(), ilMultipleImagesInputGUI\valueHasContentImageSource(), ilMultipleImagesInputGUI\valueHasContentImageTitle(), ilAssOrderingTextsInputGUI\valueHasContentText(), and ilMultipleTextsInputGUI\valueHasContentText().


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