ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
◀ ilDoc Overview
class.ilDclTextInputGUI.php
Go to the documentation of this file.
1
<?
php
2
8
class
ilDclTextInputGUI
extends
ilTextInputGUI
9
{
10
public
function
setValueByArray
($a_values)
11
{
12
parent::setValueByArray($a_values);
13
foreach
($this->
getSubItems
() as $item) {
14
$item->setValueByArray($a_values);
15
}
16
}
17
18
19
public
function
checkInput
()
20
{
21
// validate regex
22
if
($this->
getPostVar
() ==
'prop_'
.
ilDclBaseFieldModel::PROP_REGEX
&&
$_POST
[$this->
getPostVar
()]) {
23
$regex =
$_POST
[$this->
getPostVar
()];
24
if
(substr($regex, 0, 1) !=
"/"
) {
25
$regex =
"/"
. $regex;
26
}
27
if
(substr($regex, -1) !=
"/"
) {
28
$regex .=
"/"
;
29
}
30
try
{
31
preg_match($regex,
''
);
32
}
catch
(
Exception
$e) {
33
global
$DIC
;
34
$lng
= $DIC[
'lng'
];
35
$this->
setAlert
(
$lng
->txt(
'msg_input_does_not_match_regexp'
));
36
37
return
false
;
38
}
39
}
40
41
return
parent::checkInput();
42
}
43
}
ilFormPropertyGUI\$lng
$lng
Definition:
class.ilFormPropertyGUI.php:21
$DIC
global $DIC
Definition:
saml.php:7
ilFormPropertyGUI\getPostVar
getPostVar()
Get Post Variable.
Definition:
class.ilFormPropertyGUI.php:122
ilFormPropertyGUI\setAlert
setAlert($a_alert)
Set Alert Text.
Definition:
class.ilFormPropertyGUI.php:165
ilDclTextInputGUI\setValueByArray
setValueByArray($a_values)
Definition:
class.ilDclTextInputGUI.php:10
ilDclTextInputGUI
Class ilDclTextInputGUI.
Definition:
class.ilDclTextInputGUI.php:8
ilDclTextInputGUI\checkInput
checkInput()
Definition:
class.ilDclTextInputGUI.php:19
ilTextInputGUI
This class represents a text property in a property form.
Definition:
class.ilTextInputGUI.php:16
ilDclBaseFieldModel\PROP_REGEX
const PROP_REGEX
Definition:
class.ilDclBaseFieldModel.php:74
ilSubEnabledFormPropertyGUI\getSubItems
getSubItems()
Get Subitems.
Definition:
class.ilSubEnabledFormPropertyGUI.php:53
php
$_POST
$_POST["username"]
Definition:
cfg.phpunit.template.php:11
Exception
Modules
DataCollection
classes
Helpers
class.ilDclTextInputGUI.php
Generated on Thu Jan 16 2025 19:02:02 for ILIAS by
1.8.13 (using
Doxyfile
)