ILIAS
release_5-2 Revision v5.2.25-18-g3f80b828510
◀ ilDoc Overview
class.ilDclTextInputGUI.php
Go to the documentation of this file.
1
<?
php
2
3
require_once(
'./Services/Form/classes/class.ilTextInputGUI.php'
);
4
10
class
ilDclTextInputGUI
extends
ilTextInputGUI
11
{
12
13
function
setValueByArray
($a_values)
14
{
15
parent::setValueByArray($a_values);
16
foreach
($this->
getSubItems
() as $item) {
17
$item->setValueByArray($a_values);
18
}
19
20
}
21
22
23
function
checkInput
() {
24
// validate regex
25
if
($this->
getPostVar
() ==
'prop_'
.
ilDclBaseFieldModel::PROP_REGEX
&&
$_POST
[$this->
getPostVar
()]) {
26
$regex =
$_POST
[$this->
getPostVar
()];
27
if
(substr($regex, 0, 1) !=
"/"
) {
28
$regex =
"/"
. $regex;
29
}
30
if
(substr($regex, - 1) !=
"/"
) {
31
$regex .=
"/"
;
32
}
33
try
{
34
preg_match($regex,
''
);
35
}
catch
(
Exception
$e) {
36
global
$lng
;
37
$this->
setAlert
($lng->txt(
'msg_input_does_not_match_regexp'
));
38
return
false
;
39
}
40
}
41
42
return
parent::checkInput();
43
}
44
}
ilFormPropertyGUI\getPostVar
getPostVar()
Get Post Variable.
Definition:
class.ilFormPropertyGUI.php:108
ilFormPropertyGUI\setAlert
setAlert($a_alert)
Set Alert Text.
Definition:
class.ilFormPropertyGUI.php:151
ilDclTextInputGUI\setValueByArray
setValueByArray($a_values)
Definition:
class.ilDclTextInputGUI.php:13
ilDclTextInputGUI
Class ilDclTextInputGUI.
Definition:
class.ilDclTextInputGUI.php:10
ilDclTextInputGUI\checkInput
checkInput()
Definition:
class.ilDclTextInputGUI.php:23
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:81
$lng
global $lng
Definition:
privfeed.php:17
ilSubEnabledFormPropertyGUI\getSubItems
getSubItems()
Get Subitems.
Definition:
class.ilSubEnabledFormPropertyGUI.php:52
php
$_POST
$_POST["username"]
Definition:
cfg.phpunit.template.php:11
Exception
Modules
DataCollection
classes
Helpers
class.ilDclTextInputGUI.php
Generated on Fri Jan 17 2025 19:00:58 for ILIAS by
1.8.13 (using
Doxyfile
)