ILIAS  release_8 Revision v8.24
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
 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 = "" 
)

Reimplemented from ilFormPropertyGUI.

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

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

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)
@inheritDoc

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, ilCategoryWizardInputGUI, ilMatrixRowWizardInputGUI, ilAnswerWizardInputGUI, ilErrorTextWizardInputGUI, ilEssayKeywordWizardInputGUI, ilImageWizardInputGUI, ilKprimChoiceWizardInputGUI, ilKVPWizardInputGUI, ilMatchingPairWizardInputGUI, ilMatchingWizardInputGUI, ilMultipleChoiceWizardInputGUI, ilSingleChoiceWizardInputGUI, ilAssAnswerCorrectionsInputGUI, ilAssClozeTestCombinationVariantsInputGUI, ilAssErrorTextCorrectionsInputGUI, ilAssLongmenuCorrectionsInputGUI, ilAssMatchingPairCorrectionsInputGUI, ilAssMultipleChoiceCorrectionsInputGUI, ilAssSingleChoiceCorrectionsInputGUI, ilIdentifiedMultiValuesInputGUI, ilKprimChoiceCorrectionsInputGUI, ilColorPickerInputGUI, ilFormulaInputGUI, ilRegExpInputGUI, ilSelectBuilderInputGUI, ilTextWizardInputGUI, ilUriInputGUI, ilMailQuickFilterInputGUI, ilLuceneQueryInputGUI, and ilTRBLColorPickerInputGUI.

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

179 : bool
180 {
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(
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(
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...

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 130 of file class.ilTextInputGUI.php.

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

References $css_class.

Referenced by ilMailQuickFilterInputGUI\render().

+ Here is the caller graph for this function:

◆ getDataSource()

ilTextInputGUI::getDataSource ( )

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

233 : string
234 {
236 }

References $ajax_datasource.

◆ getDataSourceSubmitOnSelection()

ilTextInputGUI::getDataSourceSubmitOnSelection ( )

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

251 : bool
252 {
254 }

◆ getDataSourceSubmitUrl()

ilTextInputGUI::getDataSourceSubmitUrl ( )

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

261 : string
262 {
264 }
string $ajax_datasource_commit_url

◆ getInlineStyle()

ilTextInputGUI::getInlineStyle ( )

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

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

References $style_css.

Referenced by ilMailQuickFilterInputGUI\render().

+ Here is the caller graph for this function:

◆ getInput()

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

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

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

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

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 164 of file class.ilTextInputGUI.php.

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

References $input_type.

Referenced by ilMailQuickFilterInputGUI\render().

+ Here is the caller graph for this function:

◆ getMaxLength()

◆ getPostValueForComparison()

ilTextInputGUI::getPostValueForComparison ( )

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

455 : string
456 {
457 return $this->getInput();
458 }

◆ getSize()

◆ getSubmitFormOnEnter()

ilTextInputGUI::getSubmitFormOnEnter ( )

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

174 : bool
175 {
177 }

References $submit_form_on_enter.

Referenced by ilMailQuickFilterInputGUI\render().

+ Here is the caller graph for this function:

◆ getSuffix()

ilTextInputGUI::getSuffix ( )

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

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

References $suffix.

Referenced by ilMailQuickFilterInputGUI\render().

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

433 : string
434 {
435 $html = $this->render();
436 return $html;
437 }
render(string $a_mode="")

◆ getToolbarHTML()

ilTextInputGUI::getToolbarHTML ( )

Get input item HTML to be inserted into ilToolbarGUI.

Implements ilToolbarItem.

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

439 : string
440 {
441 $html = $this->render("toolbar");
442 return $html;
443 }

◆ getValidationFailureMessage()

ilTextInputGUI::getValidationFailureMessage ( )

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

85 : string
86 {
88 }

References $validationFailureMessage.

Referenced by checkInput().

+ Here is the caller graph for this function:

◆ getValidationRegexp()

ilTextInputGUI::getValidationRegexp ( )

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

95 : string
96 {
98 }

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 ilDclMultiTextInputGUI, and ilIdentifiedMultiValuesInputGUI.

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

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

References $value.

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

+ Here is the caller graph for this function:

◆ insert()

◆ isHtmlAutoCompleteDisabled()

ilTextInputGUI::isHtmlAutoCompleteDisabled ( )

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

450 : bool
451 {
453 }

◆ render()

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

Reimplemented in ilDclMultiTextInputGUI, ilMultipleImagesInputGUI, ilMultipleNestedOrderingElementsInputGUI, ilMultipleTextsInputGUI, ilTextWizardInputGUI, and ilMailQuickFilterInputGUI.

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

277 : string
278 {
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 }
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
static initjQueryUI(ilGlobalTemplateInterface $a_tpl=null)
inits and adds the jQuery-UI JS-File to the global template (see 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

References $lng, $tpl, ILIAS\UI\Implementation\Component\Input\getValue(), iljQueryUtil\initjQuery(), iljQueryUtil\initjQueryUI(), 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 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.

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

Referenced by ilRoleAutoCompleteInputGUI\__construct().

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

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

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

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

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

+ Here is the caller graph for this function:

◆ setMaxLength()

ilTextInputGUI::setMaxLength ( ?int  $a_maxlength)

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

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

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 ilDclMultiTextInputGUI, and ilIdentifiedMultiValuesInputGUI.

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

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 }

Referenced by setValue().

+ Here is the caller graph for this function:

◆ setSize()

ilTextInputGUI::setSize ( int  $a_size)

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

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

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

+ Here is the caller graph for this function:

◆ setSubmitFormOnEnter()

ilTextInputGUI::setSubmitFormOnEnter ( bool  $a_val)

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

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

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

◆ setValueByArray()

ilTextInputGUI::setValueByArray ( array  $a_values)

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

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

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

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

◆ $ajax_datasource_commit_url

string ilTextInputGUI::$ajax_datasource_commit_url = ""
protected

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

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

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


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