ILIAS
release_10 Revision v10.1-43-ga1241a92c2f
◀ ilDoc Overview
class.ilUriInputGUI.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
use
ILIAS\Data\URI
;
22
28
class
ilUriInputGUI
extends
ilTextInputGUI
29
{
30
protected
?
int
$maxlength
= 500;
31
protected
int
$size
= 40;
32
33
public
function
__construct
(
34
string
$a_title =
""
,
35
string
$a_postvar =
""
36
) {
37
global
$DIC
;
38
39
$this->
lng
= $DIC->language();
40
parent::__construct
($a_title, $a_postvar);
41
$this->
setType
(
"uri"
);
42
}
43
44
public
function
checkInput
(): bool
45
{
46
$lng
=
$this->lng
;
47
48
$uri_string = trim($this->
getInput
());
49
50
// check required
51
if
($uri_string ===
""
) {
52
if
($this->
getRequired
()) {
53
$this->
setAlert
(
$lng
->
txt
(
"msg_input_is_required"
));
54
return
false
;
55
}
56
return
true
;
57
}
58
59
try
{
60
new
URI
($uri_string);
61
}
catch
(
Throwable
$e
) {
62
$this->
setAlert
(
$lng
->
txt
(
"form_invalid_uri"
));
63
return
false
;
64
}
65
66
return
true
;
67
}
68
}
ilLanguage\txt
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...
Definition:
class.ilLanguage.php:171
ilFormPropertyGUI\setAlert
setAlert(string $a_alert)
Definition:
class.ilFormPropertyGUI.php:145
Vendor\Package\$e
$e
Definition:
example_cleaned.php:49
ilUriInputGUI\$maxlength
int $maxlength
Definition:
class.ilUriInputGUI.php:30
ilFormPropertyGUI\setType
setType(string $a_type)
Definition:
class.ilFormPropertyGUI.php:98
ilUriInputGUI\$size
int $size
Definition:
class.ilUriInputGUI.php:31
ILIAS\Repository\lng
lng()
Definition:
trait.GlobalDICDomainServices.php:61
$DIC
global $DIC
Definition:
shib_login.php:25
ilUriInputGUI
Legacy Uri input.
Definition:
class.ilUriInputGUI.php:28
ILIAS\Data\URI
The scope of this class is split ilias-conform URI's into components.
Definition:
URI.php:34
ilTextInputGUI
ilTextInputGUI\getInput
getInput()
Definition:
class.ilTextInputGUI.php:225
ILIAS\Data\URI
ILIAS\GlobalScreen\Provider\__construct
__construct(Container $dic, ilPlugin $plugin)
Definition:
PluginProviderHelper.php:37
ilFormPropertyGUI\getRequired
getRequired()
Definition:
class.ilFormPropertyGUI.php:160
ilFormPropertyGUI\$lng
ilLanguage $lng
Definition:
class.ilFormPropertyGUI.php:36
ilUriInputGUI\checkInput
checkInput()
Definition:
class.ilUriInputGUI.php:44
ilUriInputGUI\__construct
__construct(string $a_title="", string $a_postvar="")
Definition:
class.ilUriInputGUI.php:33
Throwable
components
ILIAS
Form
classes
class.ilUriInputGUI.php
Generated on Wed Sep 10 2025 15:15:39 for ILIAS by
1.8.13 (using
Doxyfile
)