ILIAS
trunk Revision v11.0_alpha-3011-gc6b235a2e85
◀ ilDoc Overview
with_error.php
Go to the documentation of this file.
1
<?php
2
19
declare(strict_types=1);
20
21
namespace
ILIAS\UI\examples\Input\Field\Text
;
22
35
function
with_error
()
36
{
37
//Declare dependencies
38
global
$DIC
;
39
$ui =
$DIC
->ui()->factory();
40
$renderer
=
$DIC
->ui()->renderer();
41
42
//Define the text input field
43
$text_input = $ui->input()->field()->text(
"Basic Input"
,
"Just some basic input
44
with some error attached."
)
45
->withError(
"Some error"
);
46
47
//Define the form and attach the section.
48
$form = $ui->input()->container()->form()->standard(
"#"
, [$text_input]);
49
50
//Render the form with the text input field
51
return
$renderer
->render($form);
52
}
$renderer
$renderer
Definition:
build_bootstrap.php:83
ILIAS\UI\examples\Input\Field\Text
Definition:
base.php:21
ILIAS\UI\examples\Input\Field\Text\with_error
with_error()
Definition:
with_error.php:35
$DIC
global $DIC
Definition:
shib_login.php:26
components
ILIAS
UI
src
examples
Input
Field
Text
with_error.php
Generated on Sat Oct 18 2025 23:04:40 for ILIAS by
1.9.4 (using
Doxyfile
)