ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
base.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\examples\Input\Field\Link
;
22
36
function
base
()
37
{
38
global
$DIC
;
39
$ui =
$DIC
->ui()->factory();
40
$renderer
=
$DIC
->ui()->renderer();
41
$request =
$DIC
->http()->request();
42
43
$link_input = $ui->input()->field()->link(
"Link Input"
,
"Enter a label and the url "
)
44
->withValue([
'ILIAS Homepage'
,
"https://www.ilias.de/"
]);
45
46
$form = $ui->input()->container()->form()->standard(
"#"
, [$link_input]);
47
48
$result =
"No result yet."
;
49
if
($request->getMethod() ==
"POST"
) {
50
$form = $form->withRequest($request);
51
$data
= $form->getData();
52
if
(
$data
) {
53
$result =
$data
[0];
54
}
55
}
56
57
return
58
"<pre>"
. print_r($result,
true
) .
"</pre><br />"
.
59
$renderer
->render($form);
60
}
$renderer
$renderer
Definition:
build_bootstrap.php:83
$data
$data
Definition:
ltiregistration.php:29
ILIAS\UI\examples\Input\Field\Link
Definition:
base.php:21
ILIAS\UI\examples\Input\Field\Link\base
base()
Definition:
base.php:36
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
UI
src
examples
Input
Field
Link
base.php
Generated on Sat Oct 18 2025 23:04:39 for ILIAS by
1.9.4 (using
Doxyfile
)