ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
◀ ilDoc Overview
class.ilDclTextInputGUI.php
Go to the documentation of this file.
1
<?php
2
3
9
class
ilDclTextInputGUI
extends
ilTextInputGUI
10
{
11
public
function
setValueByArray
($a_values)
12
{
13
parent::setValueByArray($a_values);
14
foreach
($this->
getSubItems
() as $item) {
15
$item->setValueByArray($a_values);
16
}
17
}
18
19
20
public
function
checkInput
()
21
{
22
// validate regex
23
if
($this->
getPostVar
() ==
'prop_'
.
ilDclBaseFieldModel::PROP_REGEX
&&
$_POST
[$this->
getPostVar
()]) {
24
$regex =
$_POST
[$this->
getPostVar
()];
25
if
(substr($regex, 0, 1) !=
"/"
) {
26
$regex =
"/"
. $regex;
27
}
28
if
(substr($regex, -1) !=
"/"
) {
29
$regex .=
"/"
;
30
}
31
try
{
32
preg_match($regex,
''
);
33
}
catch
(
Exception
$e) {
34
global
$DIC
;
35
$lng
= $DIC[
'lng'
];
36
$this->
setAlert
(
$lng
->txt(
'msg_input_does_not_match_regexp'
));
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:11
ilDclTextInputGUI
Class ilDclTextInputGUI.
Definition:
class.ilDclTextInputGUI.php:9
ilDclTextInputGUI\checkInput
checkInput()
Definition:
class.ilDclTextInputGUI.php:20
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:76
ilSubEnabledFormPropertyGUI\getSubItems
getSubItems()
Get Subitems.
Definition:
class.ilSubEnabledFormPropertyGUI.php:53
$_POST
$_POST["username"]
Definition:
cfg.phpunit.template.php:11
Exception
Modules
DataCollection
classes
Helpers
class.ilDclTextInputGUI.php
Generated on Sat Jan 18 2025 19:01:15 for ILIAS by
1.8.13 (using
Doxyfile
)