ILIAS  release_4-4 Revision
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 ($a_title="", $a_postvar="")
 Constructor. More...
 
 setValue ($a_value)
 Set Value. More...
 
 getValue ()
 Get Value. More...
 
 setValidationFailureMessage ($a_msg)
 Set message string for validation failure. More...
 
 getValidationFailureMessage ()
 
 setValidationRegexp ($a_value)
 Set validation regexp. More...
 
 getValidationRegexp ()
 Get validation regexp. More...
 
 setMaxLength ($a_maxlength)
 Set Max Length. More...
 
 getMaxLength ()
 Get Max Length. More...
 
 setSize ($a_size)
 Set Size. More...
 
 setInlineStyle ($a_style)
 Set inline style. More...
 
 getInlineStyle ()
 Get inline style. More...
 
 setCssClass ($a_class)
 
 getCssClass ()
 
 setValueByArray ($a_values)
 Set value by array. More...
 
 getSize ()
 Get Size. More...
 
 setSuffix ($a_value)
 Set suffix. More...
 
 getSuffix ()
 Get suffix. More...
 
 setInputType ($a_type)
 set input type More...
 
 getInputType ()
 get input type More...
 
 setSubmitFormOnEnter ($a_val)
 Set submit form on enter. More...
 
 getSubmitFormOnEnter ()
 Get submit form on enter. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 getDataSource ()
 get datasource link for js autocomplete More...
 
 setDataSource ($href, $a_delimiter=null)
 set datasource link for js autocomplete More...
 
 setMultiValues (array $a_values)
 
 render ($a_mode="")
 Render item. More...
 
 insert (&$a_tpl)
 Insert property html. More...
 
 getTableFilterHTML ()
 Get HTML for table filter. More...
 
 getToolbarHTML ()
 Get HTML for toolbar. More...
 
 setDisableHtmlAutoComplete ($autocomplete)
 
 isHtmlAutoCompleteDisabled ()
 
- Public Member Functions inherited from ilSubEnabledFormPropertyGUI
 addSubItem ($a_item)
 Add Subitem. More...
 
 getSubItems ()
 Get Subitems. More...
 
 getSubInputItemsRecursive ()
 returns a flat array of possibly existing subitems recursively More...
 
 checkSubItemsInput ()
 Check SubItems. More...
 
 getSubForm ()
 Get sub form html. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
- Public Member Functions inherited from ilFormPropertyGUI
 __construct ($a_title="", $a_postvar="")
 Constructor. More...
 
executeCommand ()
 Execute command. More...
 
 getType ()
 Get Type. More...
 
 setTitle ($a_title)
 Set Title. More...
 
 getTitle ()
 Get Title. More...
 
 setPostVar ($a_postvar)
 Set Post Variable. More...
 
 getPostVar ()
 Get Post Variable. More...
 
 getFieldId ()
 Get Post Variable. More...
 
 setInfo ($a_info)
 Set Information Text. More...
 
 getInfo ()
 Get Information Text. More...
 
 setAlert ($a_alert)
 Set Alert Text. More...
 
 getAlert ()
 Get Alert Text. More...
 
 setRequired ($a_required)
 Set Required. More...
 
 getRequired ()
 Get Required. More...
 
 setDisabled ($a_disabled)
 Set Disabled. More...
 
 getDisabled ()
 Get Disabled. More...
 
 checkInput ()
 Check input, strip slashes etc. More...
 
 setParentForm ($a_parentform)
 Set Parent Form. More...
 
 getParentForm ()
 Get Parent Form. More...
 
 setParent ($a_val)
 Set Parent GUI object. More...
 
 getParent ()
 Get Parent GUI object. More...
 
 getSubForm ()
 Get sub form html. More...
 
 hideSubForm ()
 Sub form hidden on init? More...
 
 setHiddenTitle ($a_val)
 Set hidden title (for screenreaders) More...
 
 getHiddenTitle ()
 Get hidden title. More...
 
 getItemByPostVar ($a_post_var)
 Get item by post var. More...
 
 serializeData ()
 serialize data More...
 
 unserializeData ($a_data)
 unserialize data More...
 
 writeToSession ()
 Write to session. More...
 
 clearFromSession ()
 Clear session value. More...
 
 readFromSession ()
 Read from session. More...
 
 getHiddenTag ($a_post_var, $a_value)
 Get hidden tag (used for disabled properties) More...
 
 setMulti ($a_multi, $a_sortable=false, $a_addremove=true)
 Set Multi. More...
 
 getMulti ()
 Get Multi. More...
 
 setMultiValues (array $a_values)
 Set multi values. More...
 
 getMultiValues ()
 Get multi values. More...
 
 getContentOutsideFormTag ()
 Get content that has to reside outside of the parent form tag, e.g. More...
 

Protected Attributes

 $value
 
 $maxlength = 200
 
 $size = 40
 
 $validationRegexp
 
 $validationFailureMessage = ''
 
 $suffix
 
 $style_css
 
 $css_class
 
 $ajax_datasource
 
 $ajax_datasource_delimiter
 
 $submit_form_on_enter = false
 
 $autocomplete_disabled = false
 
- Protected Attributes inherited from ilSubEnabledFormPropertyGUI
 $sub_items = array()
 
- Protected Attributes inherited from ilFormPropertyGUI
 $type
 
 $title
 
 $postvar
 
 $info
 
 $alert
 
 $required = false
 
 $parentgui
 
 $parentform
 
 $hidden_title = ""
 
 $multi = false
 
 $multi_sortable = false
 
 $multi_addremove = true
 
 $multi_values
 

Additional Inherited Members

- Protected Member Functions inherited from ilFormPropertyGUI
 setType ($a_type)
 Set Type. More...
 
 getMultiIconsHTML ()
 Get HTML for multiple value icons. More...
 

Detailed Description

This class represents a text property in a property form.

Author
Alex Killing alex..nosp@m.kill.nosp@m.ing@g.nosp@m.mx.d.nosp@m.e
Version
$Id$

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

Constructor & Destructor Documentation

◆ __construct()

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

Constructor.

Parameters
string$a_titleTitle
string$a_postvarPost Variable

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

References setInputType(), and ilFormPropertyGUI\setType().

42  {
43  parent::__construct($a_title, $a_postvar);
44  $this->setInputType("text");
45  $this->setType("text");
46  $this->validationRegexp = "";
47  }
setType($a_type)
Set Type.
setInputType($a_type)
set input type
+ 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.

Returns
boolean Input ok, true/false

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

References $_POST, $lng, $value, ilSubEnabledFormPropertyGUI\checkSubItemsInput(), ilFormPropertyGUI\getMulti(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), getValidationFailureMessage(), getValidationRegexp(), ilFormPropertyGUI\setAlert(), and ilUtil\stripSlashes().

259  {
260  global $lng;
261 
262  if(!$this->getMulti())
263  {
264  $_POST[$this->getPostVar()] = ilUtil::stripSlashes($_POST[$this->getPostVar()]);
265  if ($this->getRequired() && trim($_POST[$this->getPostVar()]) == "")
266  {
267  $this->setAlert($lng->txt("msg_input_is_required"));
268 
269  return false;
270  }
271  else if (strlen($this->getValidationRegexp()))
272  {
273  if (!preg_match($this->getValidationRegexp(), $_POST[$this->getPostVar()]))
274  {
275  $this->setAlert(
276  $this->getValidationFailureMessage() ?
277  $this->getValidationFailureMessage() :
278  $lng->txt('msg_wrong_format')
279  );
280  return FALSE;
281  }
282  }
283  }
284  else
285  {
286  foreach($_POST[$this->getPostVar()] as $idx => $value)
287  {
288  $_POST[$this->getPostVar()][$idx] = ilUtil::stripSlashes($value);
289  }
290  $_POST[$this->getPostVar()] = array_unique($_POST[$this->getPostVar()]);
291 
292  if ($this->getRequired() && !trim(implode("", $_POST[$this->getPostVar()])))
293  {
294  $this->setAlert($lng->txt("msg_input_is_required"));
295 
296  return false;
297  }
298  else if (strlen($this->getValidationRegexp()))
299  {
300  $reg_valid = true;
301  foreach($_POST[$this->getPostVar()] as $value)
302  {
303  if (!preg_match($this->getValidationRegexp(), $value))
304  {
305  $reg_valid = false;
306  break;
307  }
308  }
309  if(!$reg_valid)
310  {
311  $this->setAlert(
312  $this->getValidationFailureMessage() ?
313  $this->getValidationFailureMessage() :
314  $lng->txt('msg_wrong_format')
315  );
316  return false;
317  }
318  }
319  }
320 
321  return $this->checkSubItemsInput();
322  }
$_POST['username']
Definition: cron.php:12
getPostVar()
Get Post Variable.
setAlert($a_alert)
Set Alert Text.
getValidationRegexp()
Get validation regexp.
static stripSlashes($a_str, $a_strip_html=true, $a_allow="")
strip slashes if magic qoutes is enabled
global $lng
Definition: privfeed.php:40
+ Here is the call graph for this function:

◆ getCssClass()

ilTextInputGUI::getCssClass ( )

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

References $css_class.

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

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

◆ getDataSource()

ilTextInputGUI::getDataSource ( )

get datasource link for js autocomplete

Returns
String link to data generation script

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

References $ajax_datasource.

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

329  {
330  return $this->ajax_datasource;
331  }
+ Here is the caller graph for this function:

◆ getInlineStyle()

ilTextInputGUI::getInlineStyle ( )

Get inline style.

Returns
string style

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

References $style_css.

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

156  {
157  return $this->style_css;
158  }
+ Here is the caller graph for this function:

◆ getInputType()

ilTextInputGUI::getInputType ( )

get input type

public

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

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

229  {
230  return $this->input_type;
231  }
+ Here is the caller graph for this function:

◆ getMaxLength()

◆ getSize()

◆ getSubmitFormOnEnter()

ilTextInputGUI::getSubmitFormOnEnter ( )

Get submit form on enter.

Returns
boolean

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

References $submit_form_on_enter.

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

249  {
251  }
+ Here is the caller graph for this function:

◆ getSuffix()

ilTextInputGUI::getSuffix ( )

Get suffix.

Returns
string suffix

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

References $suffix.

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

207  {
208  return $this->suffix;
209  }
+ Here is the caller graph for this function:

◆ getTableFilterHTML()

ilTextInputGUI::getTableFilterHTML ( )

Get HTML for table filter.

Implements ilTableFilterItem.

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

References render().

522  {
523  $html = $this->render();
524  return $html;
525  }
render($a_mode="")
Render item.
+ Here is the call graph for this function:

◆ getToolbarHTML()

ilTextInputGUI::getToolbarHTML ( )

Get HTML for toolbar.

Implements ilToolbarItem.

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

References render().

531  {
532  $html = $this->render("toolbar");
533  return $html;
534  }
render($a_mode="")
Render item.
+ 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().

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

◆ getValidationRegexp()

ilTextInputGUI::getValidationRegexp ( )

Get validation regexp.

Returns
string regexp

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

References $validationRegexp.

Referenced by ilSelectBuilderInputGUI\checkInput(), ilTextWizardInputGUI\checkInput(), ilOrderingTextWizardInputGUI\checkInput(), and checkInput().

106  {
108  }
+ Here is the caller graph for this function:

◆ getValue()

ilTextInputGUI::getValue ( )

Get Value.

Returns
string Value

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

References $value.

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

70  {
71  return $this->value;
72  }
+ Here is the caller graph for this function:

◆ insert()

ilTextInputGUI::insert ( $a_tpl)

Insert property html.

Returns
int Size

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

References render().

510  {
511  $html = $this->render();
512 
513  $a_tpl->setCurrentBlock("prop_generic");
514  $a_tpl->setVariable("PROP_GENERIC", $html);
515  $a_tpl->parseCurrentBlock();
516  }
render($a_mode="")
Render item.
+ Here is the call graph for this function:

◆ isHtmlAutoCompleteDisabled()

ilTextInputGUI::isHtmlAutoCompleteDisabled ( )
Returns
boolean

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

References $autocomplete_disabled.

Referenced by render().

548  {
550  }
+ Here is the caller graph for this function:

◆ render()

ilTextInputGUI::render (   $a_mode = "")

Render item.

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

References ilFormPropertyGUI\$postvar, $tpl, $value, getCssClass(), getDataSource(), ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getHiddenTag(), getInlineStyle(), getInputType(), getMaxLength(), ilFormPropertyGUI\getMulti(), ilFormPropertyGUI\getMultiIconsHTML(), ilFormPropertyGUI\getMultiValues(), ilFormPropertyGUI\getPostVar(), getSize(), getSubmitFormOnEnter(), getSuffix(), getValue(), iljQueryUtil\initjQuery(), iljQueryUtil\initjQueryUI(), isHtmlAutoCompleteDisabled(), and ilUtil\prepareFormOutput().

Referenced by ilMailQuickFilterInputGUI\checkInput(), getTableFilterHTML(), getToolbarHTML(), and insert().

360  {
361  $tpl = new ilTemplate("tpl.prop_textinput.html", true, true, "Services/Form");
362  if (strlen($this->getValue()))
363  {
364  $tpl->setCurrentBlock("prop_text_propval");
365  $tpl->setVariable("PROPERTY_VALUE", ilUtil::prepareFormOutput($this->getValue()));
366  $tpl->parseCurrentBlock();
367  }
368  if (strlen($this->getInlineStyle()))
369  {
370  $tpl->setCurrentBlock("stylecss");
371  $tpl->setVariable("CSS_STYLE", ilUtil::prepareFormOutput($this->getInlineStyle()));
372  $tpl->parseCurrentBlock();
373  }
374  if(strlen($this->getCssClass()))
375  {
376  $tpl->setCurrentBlock("classcss");
377  $tpl->setVariable('CLASS_CSS', ilUtil::prepareFormOutput($this->getCssClass()));
378  $tpl->parseCurrentBlock();
379  }
380  if ($this->getSubmitFormOnEnter())
381  {
382  $tpl->touchBlock("submit_form_on_enter");
383  }
384 
385  switch($this->getInputType())
386  {
387  case 'password':
388  $tpl->setVariable('PROP_INPUT_TYPE','password');
389  break;
390  case 'hidden':
391  $tpl->setVariable('PROP_INPUT_TYPE','hidden');
392  break;
393  case 'text':
394  default:
395  $tpl->setVariable('PROP_INPUT_TYPE','text');
396  }
397  $tpl->setVariable("ID", $this->getFieldId());
398  $tpl->setVariable("SIZE", $this->getSize());
399  if($this->getMaxLength() != null)
400  $tpl->setVariable("MAXLENGTH", $this->getMaxLength());
401  if (strlen($this->getSuffix())) $tpl->setVariable("INPUT_SUFFIX", $this->getSuffix());
402 
403  $postvar = $this->getPostVar();
404  if($this->getMulti() && substr($postvar, -2) != "[]")
405  {
406  $postvar .= "[]";
407  }
408 
409  if ($this->getDisabled())
410  {
411  if($this->getMulti())
412  {
413  $value = $this->getMultiValues();
414  $hidden = "";
415  if(is_array($value))
416  {
417  foreach($value as $item)
418  {
419  $hidden .= $this->getHiddenTag($postvar, $item);
420  }
421  }
422  }
423  else
424  {
425  $hidden = $this->getHiddenTag($postvar, $this->getValue());
426  }
427  if($hidden)
428  {
429  $tpl->setVariable("DISABLED", " disabled=\"disabled\"");
430  $tpl->setVariable("HIDDEN_INPUT", $hidden);
431  }
432  }
433  else
434  {
435  $tpl->setVariable("POST_VAR", $postvar);
436  }
437 
438  // use autocomplete feature?
439  if ($this->getDataSource())
440  {
441  include_once "Services/jQuery/classes/class.iljQueryUtil.php";
444 
445  if ($this->getMulti())
446  {
447  $tpl->setCurrentBlock("ac_multi");
448  $tpl->setVariable('MURL_AUTOCOMPLETE', $this->getDataSource());
449  $tpl->setVariable('ID_AUTOCOMPLETE', $this->getFieldId());
450  $tpl->parseCurrentBlock();
451 
452  // set to fields that start with autocomplete selector
453  $sel_auto = '[id^="'.$this->getFieldId().'"]';
454  }
455  else
456  {
457  // use id for autocomplete selector
458  $sel_auto = "#".$this->getFieldId();
459  }
460 
461  if(!$this->ajax_datasource_delimiter)
462  {
463  $tpl->setCurrentBlock("autocomplete_bl");
464  $tpl->setVariable('SEL_AUTOCOMPLETE', $sel_auto);
465  $tpl->setVariable('URL_AUTOCOMPLETE', $this->getDataSource());
466  $tpl->parseCurrentBlock();
467  }
468  else
469  {
470  $tpl->setCurrentBlock("autocomplete_bl");
471  $tpl->setVariable('AUTOCOMPLETE_DELIMITER', $this->ajax_datasource_delimiter);
472  $tpl->setVariable('SEL_AUTOCOMPLETE_DELIMITER', $sel_auto);
473  $tpl->setVariable('URL_AUTOCOMPLETE_DELIMITER', $this->getDataSource());
474  $tpl->parseCurrentBlock();
475  }
476  }
477 
478  if ($a_mode == "toolbar")
479  {
480  // block-inline hack, see: http://blog.mozilla.com/webdev/2009/02/20/cross-browser-inline-block/
481  // -moz-inline-stack for FF2
482  // zoom 1; *display:inline for IE6 & 7
483  $tpl->setVariable("STYLE_PAR", 'display: -moz-inline-stack; display:inline-block; zoom: 1; *display:inline;');
484  }
485  else
486  {
487  $tpl->setVariable("STYLE_PAR", '');
488  }
489 
490  if($this->isHtmlAutoCompleteDisabled())
491  {
492  $tpl->setVariable("AUTOCOMPLETE", "autocomplete=\"off\"");
493  }
494 
495  // multi icons
496  if($this->getMulti() && !$a_mode && !$this->getDisabled())
497  {
498  $tpl->setVariable("MULTI_ICONS", $this->getMultiIconsHTML());
499  }
500 
501  return $tpl->get();
502  }
static prepareFormOutput($a_str, $a_strip=false)
prepares string output for html forms public
getMaxLength()
Get Max Length.
static initjQueryUI()
Init jQuery UI (see included_components.txt for included components)
getHiddenTag($a_post_var, $a_value)
Get hidden tag (used for disabled properties)
getDataSource()
get datasource link for js autocomplete
getPostVar()
Get Post Variable.
getSuffix()
Get suffix.
getMultiIconsHTML()
Get HTML for multiple value icons.
getMultiValues()
Get multi values.
getSubmitFormOnEnter()
Get submit form on enter.
getFieldId()
Get Post Variable.
special template class to simplify handling of ITX/PEAR
if(isset($_FILES['img_file']['size']) && $_FILES['img_file']['size'] > 0) $tpl
getInputType()
get input type
static initjQuery($a_tpl=null)
Init jQuery.
getInlineStyle()
Get inline style.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setCssClass()

ilTextInputGUI::setCssClass (   $a_class)

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

161  {
162  $this->css_class = $a_class;
163  }

◆ setDataSource()

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

set datasource link for js autocomplete

Parameters
Stringlink to data generation script

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

Referenced by ilRoleAutoCompleteInputGUI\__construct(), ilUserTableGUI\initFilter(), ilObjSurveyGUI\initPropertiesForm(), ilTermsOfServiceAcceptanceHistoryTableGUI\numericOrdering(), ilPermission2GUI\owner(), ilMailAddressbookGUI\search(), and ilPaymentTrusteeGUI\showTrustees().

338  {
339  $this->ajax_datasource = $href;
340  $this->ajax_datasource_delimiter = $a_delimiter;
341  }
+ Here is the caller graph for this function:

◆ setDisableHtmlAutoComplete()

ilTextInputGUI::setDisableHtmlAutoComplete (   $autocomplete)
Parameters
boolean$autocomplete

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

540  {
541  $this->autocomplete_disabled = $autocomplete;
542  }

◆ setInlineStyle()

ilTextInputGUI::setInlineStyle (   $a_style)

Set inline style.

Parameters
string$a_stylestyle

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

Referenced by assClozeTestGUI\populateNumericGapFormPart().

146  {
147  $this->style_css = $a_style;
148  }
+ Here is the caller graph for this function:

◆ setInputType()

ilTextInputGUI::setInputType (   $a_type)

set input type

public

Parameters
stringinput type password | text

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

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

219  {
220  $this->input_type = $a_type;
221  }
+ Here is the caller graph for this function:

◆ setMaxLength()

ilTextInputGUI::setMaxLength (   $a_maxlength)

Set Max Length.

Parameters
int$a_maxlengthMax Length

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

Referenced by ilRoleAutoCompleteInputGUI\__construct(), ilSocialBookmarks\_initForm(), ilObjForumGUI\cancelPostObject(), ilObjStyleSheetGUI\createObject(), ilObjMediaCastGUI\editCastItemObject(), ilObjForumGUI\getModifiedReOnSubject(), ilObjMediaCastGUI\initAddCastItemForm(), ilPCIIMTriggerEditorGUI\initAreaEditingForm(), ilImageMapEditorGUI\initAreaEditingForm(), ilObjExerciseGUI\initAssignmentForm(), ilRatingCategoryGUI\initCategoryForm(), ilSetupGUI\initClientIniForm(), ilSetupGUI\initClientLoginForm(), ilSetupGUI\initContactDataForm(), ilObjSystemFolderGUI\initContactInformationForm(), ilObjPortfolioGUI\initCopyPageFormOptions(), ilObjPortfolioGUI\initCreateForm(), ilSetupGUI\initDbSlaveForm(), ilPCFileListGUI\initEditForm(), ilTestQuestionBrowserTableGUI\initFilter(), ilLPObjectStatisticsDailyTableGUI\initFilter(), ilLPObjectStatisticsTableGUI\initFilter(), ilPresentationListTableGUI\initFilter(), ilSurveyQuestionblockbrowserTableGUI\initFilter(), ilSurveyQuestionsTableGUI\initFilter(), ilSurveyQuestionbrowserTableGUI\initFilter(), ilAccountCodesTableGUI\initFilter(), ilTermListTableGUI\initFilter(), ilMediaPoolTableGUI\initFilter(), ilLPObjectStatisticsLPTableGUI\initFilter(), ilQuestionBrowserTableGUI\initFilter(), ilEvaluationAllTableGUI\initFilter(), ilRegistrationCodesTableGUI\initFilter(), ilLPTableBaseGUI\initFilter(), ilObjMediaPoolGUI\initFolderForm(), ilBasicSkillTemplateGUI\initForm(), ilSkillCategoryGUI\initForm(), ilBasicSkillGUI\initForm(), ilPCInteractiveImageGUI\initForm(), ilSkillTreeNodeGUI\initForm(), ilObjUserFolderGUI\initFormGeneralSettings(), ilObjSystemFolderGUI\initJavaServerForm(), ilBasicSkillGUI\initLevelForm(), ilObjMediaPoolGUI\initMediaPoolPageForm(), ilObjContentObjectGUI\initMenuEntryForm(), ilObjPortfolioBaseGUI\initPageForm(), ilSkillProfileGUI\initProfileForm(), ilObjStyleSheetGUI\initPropertiesForm(), ilMDEditorGUI\initQuickEditForm(), ilWikiPageGUI\initRenameForm(), ilObjTaxonomyGUI\initSettingsForm(), ilSettingsTemplateGUI\initSettingsTemplateForm(), ilObjStyleSheetGUI\initTagStyleForm(), ilObjTaxonomyGUI\initTaxNodeForm(), ilObjFileAccessSettingsGUI\initUploadSettingsForm(), ilObjPaymentSettingsGUI\initVatForm(), ilFileSystemGUI\listFiles(), ilObjGlossaryGUI\listTerms(), ilFileSystemGUI\renameFileForm(), ilPaymentStatisticGUI\searchUser(), ilObjPaymentSettingsGUI\searchUserSPObject(), ilObjSystemFolderGUI\showBasicSettingsObject(), and ilObjContentObjectGUI\showTooltipList().

116  {
117  $this->maxlength = $a_maxlength;
118  }
+ Here is the caller graph for this function:

◆ setMultiValues()

ilTextInputGUI::setMultiValues ( array  $a_values)

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

References $value.

Referenced by setValue().

344  {
345  foreach($a_values as $idx => $value)
346  {
347  $a_values[$idx] = trim($value);
348  if($a_values[$idx] == "")
349  {
350  unset($a_values[$idx]);
351  }
352  }
353  parent::setMultiValues($a_values);
354  }
+ Here is the caller graph for this function:

◆ setSize()

ilTextInputGUI::setSize (   $a_size)

Set Size.

Parameters
int$a_sizeSize

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

Referenced by ilRoleAutoCompleteInputGUI\__construct(), ilImageWizardInputGUI\__construct(), ilSingleChoiceWizardInputGUI\__construct(), ilMatchingWizardInputGUI\__construct(), FormMailCodesGUI\__construct(), ilAnswerWizardInputGUI\__construct(), ilAccountRegistrationGUI\__initForm(), ilMemberAgreementGUI\addCustomFields(), ilTestExpressPageObjectGUI\addQuestion(), ilObjTestGUI\addQuestionObject(), ilObjTestSettingsGeneralGUI\buildForm(), ilSurveyEditorGUI\createQuestionObject(), ilObjTestGUI\createQuestionObject(), ilObjLearningResourcesSettingsGUI\editSettings(), ilObjPaymentSettingsGUI\getSubTabs(), ilObjStyleSettingsGUI\initAddPageLayoutForm(), ilSetupGUI\initClientLoginForm(), ilObjPortfolioGUI\initCreateForm(), ilObjectPluginGUI\initCreateForm(), ilObjGlossaryGUI\initCreateForm(), ilObjCloudGUI\initCreateForm(), ilObjectGUI\initCreateForm(), ilObjSAHSLearningModuleGUI\initCreationForm(), ilObjectPluginGUI\initEditForm(), ilObjPortfolioGUI\initEditForm(), ilObjectGUI\initEditForm(), ilSurveyParticipantsGUI\initExternalRaterForm(), ilObjectCustomUserFieldsGUI\initFieldForm(), ilObjMailGUI\initForm(), ilCalendarRecurrenceGUI\initForm(), ilRegistrationSettingsGUI\initForm(), ilPageLayoutGUI\initForm(), ilObjMediaObjectGUI\initForm(), ilLDAPSettingsGUI\initForm(), ilObjUserGUI\initForm(), ilObjLinkResourceGUI\initFormLink(), ilAuthShibbolethSettingsGUI\initFormRoleAssignment(), ilLDAPSettingsGUI\initFormRoleAssignments(), ilObjectCopyGUI\initFormSearch(), ilConsultationHoursGUI\initFormSequence(), ilContainerReferenceGUI\initFormTitle(), ilObjForumGUI\initForumCreateForm(), ilSurveyParticipantsGUI\initMailRatersForm(), ilPCTableGUI\initPropertiesForm(), ilMailSearchGUI\initSearchForm(), ilObjFileBasedLMGUI\initSettingsForm(), ilECSSettingsGUI\initSettingsForm(), ilAdvancedMDRecordGUI\parseFilter(), assNumericGUI\populateAnswerSpecificFormPart(), ilPCPlaceHolderGUI\propertyGUI(), ilObjTestGUI\redirectToInfoScreenObject(), ilMailFormGUI\searchUsers(), ilObjSurveyAdministrationGUI\settingsObject(), ilMailFormGUI\showForm(), ilStartUpGUI\showLoginForm(), ilStartUpGUI\showOpenIdLoginForm(), and ilObjTaggingSettingsGUI\showUsers().

136  {
137  $this->size = $a_size;
138  }
+ Here is the caller graph for this function:

◆ setSubmitFormOnEnter()

ilTextInputGUI::setSubmitFormOnEnter (   $a_val)

Set submit form on enter.

Parameters
boolean

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

Referenced by ilObjCourseGUI\initEditForm(), ilMailFolderTableGUI\initFilter(), and ilObjGroupGUI\initForm().

239  {
240  $this->submit_form_on_enter = $a_val;
241  }
+ Here is the caller graph for this function:

◆ setSuffix()

ilTextInputGUI::setSuffix (   $a_value)

Set suffix.

Parameters
string$a_valuesuffix

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

Referenced by ilObjMailGUI\initForm().

197  {
198  $this->suffix = $a_value;
199  }
+ Here is the caller graph for this function:

◆ setValidationFailureMessage()

ilTextInputGUI::setValidationFailureMessage (   $a_msg)

Set message string for validation failure.

Returns
Parameters
string$a_msg

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

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

◆ setValidationRegexp()

ilTextInputGUI::setValidationRegexp (   $a_value)

Set validation regexp.

Parameters
string$a_valueregexp

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

Referenced by ilOpenIdSettingsGUI\initFormProvider(), and ilPermissionGUI\initRoleForm().

96  {
97  $this->validationRegexp = $a_value;
98  }
+ Here is the caller graph for this function:

◆ setValue()

ilTextInputGUI::setValue (   $a_value)

Set Value.

Parameters
string$a_valueValue

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

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

Referenced by assClozeTestGUI\addBasicQuestionFormProperties(), assQuestionGUI\addBasicQuestionFormProperties(), ilPaymentCouponGUI\addCoupon(), ilObjPaymentSettingsGUI\addCurrencyObject(), ilDAVCronDiskQuota\addCustomSettingsToForm(), ilUserProfile\addStandardFieldsToForm(), ilObjSystemFolderGUI\benchmarkObject(), ilObjTestSettingsGeneralGUI\buildForm(), ilTestScoringGUI\buildManScoringParticipantForm(), ilMailAddressbookGUI\cancel(), ilCertificateGUI\certificateEditor(), ilObjPaymentSettingsGUI\checkShopActivationObject(), ilObjPaymentSettingsGUI\editCurrencyObject(), ilObjPersonalDesktopSettingsGUI\editSettings(), ilObjPaymentSettingsGUI\editVendorObject(), ilLuceneAdvancedSearchFields\getFormElement(), ilDataCollectionDatatype\getInputField(), ilObjPaymentSettingsGUI\getSubTabs(), ilAdvancedSearchGUI\initAdvancedMetaDataForm(), ilECSSettingsGUI\initCategoryMappingForm(), ilObjMDSettingsGUI\initCopyrightEditForm(), ilSetupGUI\initDbSlaveForm(), ilRemoteObjectBaseGUI\initEditForm(), ilDidacticTemplateSettingsGUI\initEditTemplate(), ilAdvancedMDSettingsGUI\initFieldForm(), ilExtIdGUI\initForm(), ilCalendarAppointmentGUI\initForm(), ilAttendanceList\initForm(), ilAdvancedMDSettingsGUI\initForm(), ilObjSessionGUI\initForm(), ilObjGroupGUI\initForm(), ilBookmarkAdministrationGUI\initFormBookmark(), ilECSMappingSettingsGUI\initFormCSettings(), ilCourseObjectivesGUI\initFormLimits(), ilCalendarCategoryGUI\initFormSearch(), ilCASSettingsGUI\initFormSettings(), ilObjMediaCastSettingsGUI\initFormSettings(), ilObjLinkResourceGUI\initFormSettings(), ilCourseObjectivesGUI\initFormTitle(), ilObjSystemFolderGUI\initHTTPSForm(), ilObjCourseGUI\initInfoEditor(), ilObjUserFolderGUI\initNewAccountMailForm(), ilPCTableGUI\initPropertiesForm(), ilObjFileGUI\initPropertiesForm(), ilObjSurveyGUI\initPropertiesForm(), ilObjRepositorySettingsGUI\initSettingsForm(), ilECSSettingsGUI\initSettingsForm(), ilObjMediaCastGUI\initSettingsForm(), ilAdvancedMDRecordGUI\parseSearch(), ilSurveyPhrasesGUI\phraseEditor(), assJavaAppletGUI\populateQuestionSpecificFormPart(), setValueByArray(), ilShopGUI\showGeneralFilter(), ilPurchaseBMFGUI\showPersonalData(), ilPurchaseBaseGUI\showPersonalData(), and ilShopTopicsGUI\showTopicForm().

55  {
56  if($this->getMulti() && is_array($a_value))
57  {
58  $this->setMultiValues($a_value);
59  $a_value = array_shift($a_value);
60  }
61  $this->value = $a_value;
62  }
setMultiValues(array $a_values)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setValueByArray()

ilTextInputGUI::setValueByArray (   $a_values)

Set value by array.

Parameters
array$a_valuesvalue array

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

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

177  {
178  $this->setValue($a_values[$this->getPostVar()]);
179  }
getPostVar()
Get Post Variable.
setValue($a_value)
Set Value.
+ Here is the call graph for this function:

Field Documentation

◆ $ajax_datasource

ilTextInputGUI::$ajax_datasource
protected

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

Referenced by getDataSource().

◆ $ajax_datasource_delimiter

ilTextInputGUI::$ajax_datasource_delimiter
protected

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

◆ $autocomplete_disabled

ilTextInputGUI::$autocomplete_disabled = false
protected

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

Referenced by isHtmlAutoCompleteDisabled().

◆ $css_class

ilTextInputGUI::$css_class
protected

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

Referenced by getCssClass().

◆ $maxlength

ilTextInputGUI::$maxlength = 200
protected

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

Referenced by getMaxLength().

◆ $size

ilTextInputGUI::$size = 40
protected

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

Referenced by getSize().

◆ $style_css

ilTextInputGUI::$style_css
protected

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

Referenced by getInlineStyle().

◆ $submit_form_on_enter

ilTextInputGUI::$submit_form_on_enter = false
protected

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

Referenced by getSubmitFormOnEnter().

◆ $suffix

◆ $validationFailureMessage

ilTextInputGUI::$validationFailureMessage = ''
protected

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

Referenced by getValidationFailureMessage().

◆ $validationRegexp

ilTextInputGUI::$validationRegexp
protected

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

Referenced by getValidationRegexp().

◆ $value


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