ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
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
 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

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

Constructor & Destructor Documentation

◆ __construct()

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

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

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

51  {
52  global $DIC;
53  $this->lng = $DIC->language();
54  parent::__construct($a_title, $a_postvar);
55  $this->setInputType("text");
56  $this->setType("text");
57  $this->validationRegexp = "";
58  }
setInputType(string $a_type)
set input type
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilTextInputGUI::checkInput ( )

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

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

References $css_class.

Referenced by ilMailQuickFilterInputGUI\render(), and render().

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

◆ getDataSource()

ilTextInputGUI::getDataSource ( )

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

References $ajax_datasource.

Referenced by render().

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

◆ getDataSourceSubmitOnSelection()

ilTextInputGUI::getDataSourceSubmitOnSelection ( )

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

References $ajax_datasource_commit.

Referenced by render().

251  : bool
252  {
254  }
+ Here is the caller graph for this function:

◆ getDataSourceSubmitUrl()

ilTextInputGUI::getDataSourceSubmitUrl ( )

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

References $ajax_datasource_commit_url.

Referenced by render().

261  : string
262  {
264  }
string $ajax_datasource_commit_url
+ Here is the caller graph for this function:

◆ getInlineStyle()

ilTextInputGUI::getInlineStyle ( )

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

References $style_css.

Referenced by ilMailQuickFilterInputGUI\render(), and render().

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

◆ getInput()

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

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

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

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

226  {
227  if (!$this->getMulti()) {
228  return $this->str($this->getPostVar());
229  }
230  return $this->strArray($this->getPostVar());
231  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getInputType()

ilTextInputGUI::getInputType ( )

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

References $input_type.

Referenced by ilMailQuickFilterInputGUI\render(), and render().

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

◆ getMaxLength()

◆ getPostValueForComparison()

ilTextInputGUI::getPostValueForComparison ( )

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

References getInput().

455  : string
456  {
457  return $this->getInput();
458  }
+ Here is the call graph for this function:

◆ getSize()

◆ getSubmitFormOnEnter()

ilTextInputGUI::getSubmitFormOnEnter ( )

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

References $submit_form_on_enter.

Referenced by ilMailQuickFilterInputGUI\render(), and render().

174  : bool
175  {
177  }
+ Here is the caller graph for this function:

◆ getSuffix()

ilTextInputGUI::getSuffix ( )

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

References $suffix.

Referenced by ilMailQuickFilterInputGUI\render(), and render().

150  : string
151  {
152  return $this->suffix;
153  }
+ 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 433 of file class.ilTextInputGUI.php.

References render().

433  : string
434  {
435  $html = $this->render();
436  return $html;
437  }
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 439 of file class.ilTextInputGUI.php.

References render().

439  : string
440  {
441  $html = $this->render("toolbar");
442  return $html;
443  }
render(string $a_mode="")
+ Here is the call graph for this function:

◆ getValidationFailureMessage()

ilTextInputGUI::getValidationFailureMessage ( )

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

References $validationFailureMessage.

Referenced by checkInput().

85  : string
86  {
88  }
+ Here is the caller graph for this function:

◆ getValidationRegexp()

ilTextInputGUI::getValidationRegexp ( )

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

References $validationRegexp.

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

95  : string
96  {
98  }
+ Here is the caller graph for this function:

◆ getValue()

ilTextInputGUI::getValue ( )
Returns
array|string

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

References $value.

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

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

◆ insert()

ilTextInputGUI::insert ( ilTemplate  $a_tpl)

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

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

424  : void
425  {
426  $html = $this->render();
427 
428  $a_tpl->setCurrentBlock("prop_generic");
429  $a_tpl->setVariable("PROP_GENERIC", $html);
430  $a_tpl->parseCurrentBlock();
431  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
render(string $a_mode="")
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ isHtmlAutoCompleteDisabled()

ilTextInputGUI::isHtmlAutoCompleteDisabled ( )

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

References $autocomplete_disabled.

Referenced by render().

450  : bool
451  {
453  }
+ Here is the caller graph for this function:

◆ render()

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

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

References ilFormPropertyGUI\$lng, ilFormPropertyGUI\$postvar, $tpl, $value, getCssClass(), getDataSource(), getDataSourceSubmitOnSelection(), getDataSourceSubmitUrl(), 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(), iljQueryUtil\initjQuery(), iljQueryUtil\initjQueryUI(), isHtmlAutoCompleteDisabled(), ilLegacyFormElementsUtil\prepareFormOutput(), and ilLanguage\txt().

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

277  : string
278  {
279  $lng = $this->lng;
280 
281  $tpl = new ilTemplate("tpl.prop_textinput.html", true, true, "Services/Form");
282  if (strlen((string) $this->getValue())) {
283  $tpl->setCurrentBlock("prop_text_propval");
284  $tpl->setVariable(
285  "PROPERTY_VALUE",
287  );
288  $tpl->parseCurrentBlock();
289  }
290  if (strlen($this->getInlineStyle())) {
291  $tpl->setCurrentBlock("stylecss");
292  $tpl->setVariable(
293  "CSS_STYLE",
295  );
296  $tpl->parseCurrentBlock();
297  }
298  if (strlen($this->getCssClass())) {
299  $tpl->setCurrentBlock("classcss");
300  $tpl->setVariable('CLASS_CSS', ilLegacyFormElementsUtil::prepareFormOutput((string) $this->getCssClass()));
301  $tpl->parseCurrentBlock();
302  }
303  if ($this->getSubmitFormOnEnter()) {
304  $tpl->touchBlock("submit_form_on_enter");
305  }
306 
307  switch ($this->getInputType()) {
308  case 'password':
309  $tpl->setVariable('PROP_INPUT_TYPE', 'password');
310  break;
311  case 'hidden':
312  $tpl->setVariable('PROP_INPUT_TYPE', 'hidden');
313  break;
314  case 'text':
315  default:
316  $tpl->setVariable('PROP_INPUT_TYPE', 'text');
317  }
318  $tpl->setVariable("ID", $this->getFieldId());
319  $tpl->setVariable("SIZE", $this->getSize());
320  if ($this->getMaxLength() != null) {
321  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
322  }
323  if (strlen($this->getSuffix())) {
324  $tpl->setVariable("INPUT_SUFFIX", $this->getSuffix());
325  }
326 
327  $postvar = $this->getPostVar();
328  if ($this->getMulti() && substr($postvar, -2) != "[]") {
329  $postvar .= "[]";
330  }
331 
332  $tpl->setVariable("POST_VAR", $postvar);
333  if ($this->getDisabled()) {
334  if ($this->getMulti()) {
335  $value = $this->getMultiValues();
336  $hidden = "";
337  if (is_array($value)) {
338  foreach ($value as $item) {
339  $hidden .= $this->getHiddenTag($postvar, $item);
340  }
341  }
342  } else {
343  $hidden = $this->getHiddenTag($postvar, $this->getValue());
344  }
345  if ($hidden) {
346  $tpl->setVariable("HIDDEN_INPUT", $hidden);
347  }
348  $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
349  }
350 
351  // use autocomplete feature?
352  if ($this->getDataSource()) {
355 
356  $jstpl = new ilTemplate("tpl.prop_text_autocomplete.js", true, true, "Services/Form");
357 
358  if ($this->getMulti()) {
359  $jstpl->setCurrentBlock("ac_multi");
360  $jstpl->setVariable('MURL_AUTOCOMPLETE', $this->getDataSource());
361  $jstpl->setVariable('ID_AUTOCOMPLETE', $this->getFieldId());
362  $jstpl->parseCurrentBlock();
363 
364  // set to fields that start with autocomplete selector
365  $sel_auto = '[id^="' . $this->getFieldId() . '"]';
366  } else {
367  // use id for autocomplete selector
368  $sel_auto = "#" . $this->getFieldId();
369  }
370 
371  $jstpl->setCurrentBlock("autocomplete_bl");
372  if (!$this->ajax_datasource_delimiter and !$this->getDataSourceSubmitOnSelection()) {
373  $jstpl->setVariable('SEL_AUTOCOMPLETE', $sel_auto);
374  $jstpl->setVariable('URL_AUTOCOMPLETE', $this->getDataSource());
375  } elseif ($this->getDataSourceSubmitOnSelection()) {
376  $jstpl->setVariable('SEL_AUTOCOMPLETE_AUTOSUBMIT', $sel_auto);
377  $jstpl->setVariable('URL_AUTOCOMPLETE_AUTOSUBMIT_REQ', $this->getDataSource());
378  $jstpl->setVariable('URL_AUTOCOMPLETE_AUTOSUBMIT_RESP', $this->getDataSourceSubmitUrl());
379  } else {
380  $jstpl->setVariable('AUTOCOMPLETE_DELIMITER', $this->ajax_datasource_delimiter);
381  $jstpl->setVariable('SEL_AUTOCOMPLETE_DELIMITER', $sel_auto);
382  $jstpl->setVariable('URL_AUTOCOMPLETE_DELIMITER', $this->getDataSource());
383  }
384  $jstpl->parseCurrentBlock();
385 
386  $jstpl->setVariable('MORE_TXT', $lng->txt('autocomplete_more'));
387  $this->global_tpl->addOnloadCode($jstpl->get());
388  }
389 
390  if ($a_mode == "toolbar") {
391  // block-inline hack, see: http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
392  // -moz-inline-stack for FF2
393  // zoom 1; *display:inline for IE6 & 7
394  $tpl->setVariable(
395  "STYLE_PAR",
396  'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;'
397  );
398  } else {
399  $tpl->setVariable("STYLE_PAR", '');
400  }
401 
402  if ($this->isHtmlAutoCompleteDisabled()) {
403  $tpl->setVariable("AUTOCOMPLETE", "autocomplete=\"off\"");
404  }
405 
406  if ($this->getRequired()) {
407  $tpl->setVariable("REQUIRED", "required=\"required\"");
408  }
409 
410  // multi icons
411  if ($this->getMulti() && !$a_mode && !$this->getDisabled()) {
412  $tpl->touchBlock("inline_in_bl");
413  $tpl->setVariable("MULTI_ICONS", $this->getMultiIconsHTML());
414  }
415 
416  $tpl->setVariable("ARIA_LABEL", ilLegacyFormElementsUtil::prepareFormOutput($this->getTitle()));
417  if ($this->getInfo() !== '') {
418  $tpl->setVariable('DESCRIBED_BY_FIELD_ID', $this->getFieldId());
419  }
420 
421  return $tpl->get();
422  }
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...
static prepareFormOutput($a_str, bool $a_strip=false)
getHiddenTag(string $a_post_var, string $a_value)
static initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see included_components.txt for included components)
static initjQuery(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery JS-File to the global or a passed template
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
+ 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 125 of file class.ilTextInputGUI.php.

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

◆ setDataSource()

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

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

Referenced by ilRoleAutoCompleteInputGUI\__construct().

241  : void {
242  $this->ajax_datasource = $href;
243  $this->ajax_datasource_delimiter = $a_delimiter;
244  }
+ Here is the caller graph for this function:

◆ setDataSourceSubmitOnSelection()

ilTextInputGUI::setDataSourceSubmitOnSelection ( bool  $a_stat)

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

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

◆ setDataSourceSubmitUrl()

ilTextInputGUI::setDataSourceSubmitUrl ( string  $a_url)

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

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

◆ setDisableHtmlAutoComplete()

ilTextInputGUI::setDisableHtmlAutoComplete ( bool  $autocomplete)

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

445  : void
446  {
447  $this->autocomplete_disabled = $autocomplete;
448  }

◆ setInlineStyle()

ilTextInputGUI::setInlineStyle ( string  $a_style)

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

Referenced by assClozeTestGUI\populateNumericGapFormPart().

115  : void
116  {
117  $this->style_css = $a_style;
118  }
+ 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 159 of file class.ilTextInputGUI.php.

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

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

◆ setMaxLength()

ilTextInputGUI::setMaxLength ( ?int  $a_maxlength)

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

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

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

◆ setMultiValues()

ilTextInputGUI::setMultiValues ( array  $a_values)

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

References $value.

Referenced by setValue().

266  : void
267  {
268  foreach ($a_values as $idx => $value) {
269  $a_values[$idx] = trim($value);
270  if ($a_values[$idx] == "") {
271  unset($a_values[$idx]);
272  }
273  }
274  parent::setMultiValues($a_values);
275  }
+ Here is the caller graph for this function:

◆ setSize()

◆ setSubmitFormOnEnter()

ilTextInputGUI::setSubmitFormOnEnter ( bool  $a_val)

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

Referenced by ilMailFolderTableGUI\initFilter().

169  : void
170  {
171  $this->submit_form_on_enter = $a_val;
172  }
+ Here is the caller graph for this function:

◆ setSuffix()

ilTextInputGUI::setSuffix ( string  $a_value)

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

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

◆ setValidationFailureMessage()

ilTextInputGUI::setValidationFailureMessage ( string  $a_msg)

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

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

◆ setValidationRegexp()

ilTextInputGUI::setValidationRegexp ( string  $a_value)

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

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

◆ setValue()

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

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

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

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

63  : void
64  {
65  if ($this->getMulti() && is_array($a_value)) {
66  $this->setMultiValues($a_value);
67  $a_value = array_shift($a_value);
68  }
69  $this->value = $a_value;
70  }
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 135 of file class.ilTextInputGUI.php.

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

135  : void
136  {
137  $this->setValue($a_values[$this->getPostVar()] ?? "");
138  }
+ Here is the call graph for this function:

Field Documentation

◆ $ajax_datasource

string ilTextInputGUI::$ajax_datasource = ""
protected

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

Referenced by getDataSource().

◆ $ajax_datasource_commit

bool ilTextInputGUI::$ajax_datasource_commit = false
protected

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

Referenced by getDataSourceSubmitOnSelection().

◆ $ajax_datasource_commit_url

string ilTextInputGUI::$ajax_datasource_commit_url = ""
protected

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

Referenced by getDataSourceSubmitUrl().

◆ $ajax_datasource_delimiter

string ilTextInputGUI::$ajax_datasource_delimiter = null
protected

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

◆ $autocomplete_disabled

bool ilTextInputGUI::$autocomplete_disabled = false
protected

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

Referenced by isHtmlAutoCompleteDisabled().

◆ $css_class

string ilTextInputGUI::$css_class = ""
protected

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

Referenced by getCssClass().

◆ $input_type

string ilTextInputGUI::$input_type = ""
protected

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

Referenced by getInputType().

◆ $maxlength

int ilTextInputGUI::$maxlength = 200
protected

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

Referenced by getMaxLength().

◆ $size

int ilTextInputGUI::$size = 40
protected

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

Referenced by getSize().

◆ $style_css

string ilTextInputGUI::$style_css = ""
protected

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

Referenced by getInlineStyle().

◆ $submit_form_on_enter

bool ilTextInputGUI::$submit_form_on_enter = false
protected

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

Referenced by getSubmitFormOnEnter().

◆ $suffix

◆ $validationFailureMessage

string ilTextInputGUI::$validationFailureMessage = ''
protected

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

Referenced by getValidationFailureMessage().

◆ $validationRegexp

string ilTextInputGUI::$validationRegexp = ""
protected

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

Referenced by getValidationRegexp().

◆ $value

ilTextInputGUI::$value = null
protected

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

Referenced by ilKprimChoiceCorrectionsInputGUI\checkInput(), ilRegExpInputGUI\checkInput(), ilSelectBuilderInputGUI\checkInput(), ilTextWizardInputGUI\checkInput(), ilKprimChoiceWizardInputGUI\checkInput(), ilTRBLColorPickerInputGUI\checkInput(), checkInput(), ilMultipleImagesInputGUI\fetchContentImageSourceFromValue(), ilMultipleImagesInputGUI\fetchContentImageTitleFromValue(), ilMultipleTextsInputGUI\fetchContentTextFromValue(), ilColorPickerInputGUI\getInput(), getValue(), ilAssErrorTextCorrectionsInputGUI\insert(), ilAssSingleChoiceCorrectionsInputGUI\insert(), ilAssMultipleChoiceCorrectionsInputGUI\insert(), ilSelectBuilderInputGUI\insert(), ilEssayKeywordWizardInputGUI\insert(), ilAssAnswerCorrectionsInputGUI\insert(), ilTRBLColorPickerInputGUI\insert(), ilMultipleChoiceWizardInputGUI\insert(), ilImageWizardInputGUI\insert(), ilAnswerWizardInputGUI\insert(), ilErrorTextWizardInputGUI\insert(), ilKVPWizardInputGUI\insert(), ilMatchingWizardInputGUI\insert(), ilSingleChoiceWizardInputGUI\insert(), ilDclMultiTextInputGUI\render(), ilMailQuickFilterInputGUI\render(), ilTextWizardInputGUI\render(), ilMultipleTextsInputGUI\render(), ilMultipleImagesInputGUI\render(), render(), ilMultipleNestedOrderingElementsInputGUI\renderListItem(), ilMultipleNestedOrderingElementsInputGUI\renderMainList(), setMultiValues(), ilEssayKeywordWizardInputGUI\setValue(), ilAssClozeTestCombinationVariantsInputGUI\setValue(), ilKprimChoiceCorrectionsInputGUI\setValue(), ilMultipleChoiceWizardInputGUI\setValue(), ilDclMultiTextInputGUI\setValue(), ilAssSingleChoiceCorrectionsInputGUI\setValue(), ilAssMultipleChoiceCorrectionsInputGUI\setValue(), ilImageWizardInputGUI\setValue(), ilAnswerWizardInputGUI\setValue(), ilAssAnswerCorrectionsInputGUI\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: