ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilUserLoginInputGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for ilUserLoginInputGUI:
+ Collaboration diagram for ilUserLoginInputGUI:

Public Member Functions

 __construct (string $a_title="", string $a_postvar="")
 
 setValue (string $a_value)
 
 getValue ()
 
 setValueByArray (array $a_values)
 
 setCurrentUserId (int $a_user_id)
 
 getCurrentUserId ()
 
 setDisableHtmlAutoComplete (bool $a_value)
 
 isHtmlAutoCompleteDisabled ()
 
 checkInput ()
 
 getInput ()
 
 insert (ilTemplate $a_tpl)
 
- 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...
 

Protected Attributes

string $value = ""
 
int $size = 40
 
int $max_length = 80
 
int $checkunused = 0
 
bool $autocomplete_disabled = false
 
- 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 file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning This class represents a user login 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.ilUserLoginInputGUI.php.

Constructor & Destructor Documentation

◆ __construct()

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

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

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

40  {
41  global $DIC;
42 
43  $this->lng = $DIC->language();
44  parent::__construct($a_title, $a_postvar);
45  }
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ checkInput()

ilUserLoginInputGUI::checkInput ( )

Definition at line 82 of file class.ilUserLoginInputGUI.php.

References ilFormPropertyGUI\$lng, ilObjUser\_loginExists(), getCurrentUserId(), getInput(), ilFormPropertyGUI\getRequired(), ilUtil\isLogin(), ilFormPropertyGUI\setAlert(), and ilLanguage\txt().

82  : bool
83  {
84  $lng = $this->lng;
85 
86  $value = $this->getInput();
87  if ($this->getRequired() && $value == "") {
88  $this->setAlert($lng->txt("msg_input_is_required"));
89  return false;
90  }
91  if (!ilUtil::isLogin($value)) {
92  $this->setAlert($lng->txt("login_invalid"));
93  return false;
94  }
95 
97  $this->setAlert($lng->txt("login_exists"));
98  return false;
99  }
100 
101  return true;
102  }
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 _loginExists(string $a_login, int $a_user_id=0)
check if a login name already exists You may exclude a user from the check by giving his user id as 2...
static isLogin(string $a_login)
+ Here is the call graph for this function:

◆ getCurrentUserId()

ilUserLoginInputGUI::getCurrentUserId ( )

Definition at line 67 of file class.ilUserLoginInputGUI.php.

References $checkunused.

Referenced by checkInput().

67  : int
68  {
69  return $this->checkunused;
70  }
+ Here is the caller graph for this function:

◆ getInput()

ilUserLoginInputGUI::getInput ( )

Definition at line 104 of file class.ilUserLoginInputGUI.php.

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

Referenced by checkInput().

104  : string
105  {
106  return trim($this->str($this->getPostVar()));
107  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getValue()

ilUserLoginInputGUI::getValue ( )

Definition at line 52 of file class.ilUserLoginInputGUI.php.

References $value.

Referenced by insert().

52  : string
53  {
54  return $this->value;
55  }
+ Here is the caller graph for this function:

◆ insert()

ilUserLoginInputGUI::insert ( ilTemplate  $a_tpl)

Definition at line 109 of file class.ilUserLoginInputGUI.php.

References ilFormPropertyGUI\getDisabled(), ilFormPropertyGUI\getFieldId(), ilFormPropertyGUI\getPostVar(), ilFormPropertyGUI\getRequired(), getValue(), isHtmlAutoCompleteDisabled(), ilTemplate\parseCurrentBlock(), ilLegacyFormElementsUtil\prepareFormOutput(), ilTemplate\setCurrentBlock(), and HTML_Template_IT\setVariable().

109  : void
110  {
111  $a_tpl->setCurrentBlock("prop_login");
112  $a_tpl->setVariable("POST_VAR", $this->getPostVar());
113  $a_tpl->setVariable("ID", $this->getFieldId());
114  $a_tpl->setVariable("PROPERTY_VALUE", ilLegacyFormElementsUtil::prepareFormOutput($this->getValue()));
115  $a_tpl->setVariable("SIZE", $this->size);
116  $a_tpl->setVariable("MAXLENGTH", $this->max_length);
117  if ($this->getDisabled()) {
118  $a_tpl->setVariable(
119  "DISABLED",
120  " disabled=\"disabled\""
121  );
122  }
123  if ($this->isHtmlAutoCompleteDisabled()) {
124  $a_tpl->setVariable("AUTOCOMPLETE", "autocomplete=\"off\"");
125  }
126  if ($this->getRequired()) {
127  $a_tpl->setVariable("REQUIRED", "required=\"required\"");
128  }
129  $a_tpl->parseCurrentBlock();
130  }
parseCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
static prepareFormOutput($a_str, bool $a_strip=false)
setVariable($variable, $value='')
Sets a variable value.
Definition: IT.php:514
setCurrentBlock(string $part=ilGlobalTemplateInterface::DEFAULT_BLOCK)
+ Here is the call graph for this function:

◆ isHtmlAutoCompleteDisabled()

ilUserLoginInputGUI::isHtmlAutoCompleteDisabled ( )

Definition at line 77 of file class.ilUserLoginInputGUI.php.

References $autocomplete_disabled.

Referenced by insert().

77  : bool
78  {
80  }
+ Here is the caller graph for this function:

◆ setCurrentUserId()

ilUserLoginInputGUI::setCurrentUserId ( int  $a_user_id)

Definition at line 62 of file class.ilUserLoginInputGUI.php.

62  : void
63  {
64  $this->checkunused = $a_user_id;
65  }

◆ setDisableHtmlAutoComplete()

ilUserLoginInputGUI::setDisableHtmlAutoComplete ( bool  $a_value)

Definition at line 72 of file class.ilUserLoginInputGUI.php.

72  : void
73  {
74  $this->autocomplete_disabled = $a_value;
75  }

◆ setValue()

ilUserLoginInputGUI::setValue ( string  $a_value)

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

Referenced by setValueByArray().

47  : void
48  {
49  $this->value = $a_value;
50  }
+ Here is the caller graph for this function:

◆ setValueByArray()

ilUserLoginInputGUI::setValueByArray ( array  $a_values)

Definition at line 57 of file class.ilUserLoginInputGUI.php.

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

57  : void
58  {
59  $this->setValue($a_values[$this->getPostVar()]);
60  }
+ Here is the call graph for this function:

Field Documentation

◆ $autocomplete_disabled

bool ilUserLoginInputGUI::$autocomplete_disabled = false
protected

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

Referenced by isHtmlAutoCompleteDisabled().

◆ $checkunused

int ilUserLoginInputGUI::$checkunused = 0
protected

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

Referenced by getCurrentUserId().

◆ $max_length

int ilUserLoginInputGUI::$max_length = 80
protected

Definition at line 30 of file class.ilUserLoginInputGUI.php.

◆ $size

int ilUserLoginInputGUI::$size = 40
protected

Definition at line 29 of file class.ilUserLoginInputGUI.php.

◆ $value

string ilUserLoginInputGUI::$value = ""
protected

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

Referenced by getValue().


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