ILIAS
trunk Revision v12.0_alpha-377-g3641b37b9db
◀ 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\Container\Form\Standard
;
22
34
function
base
()
35
{
36
//Step 0: Declare dependencies
37
global
$DIC
;
38
$ui =
$DIC
->ui()->factory();
39
$renderer
=
$DIC
->ui()->renderer();
40
41
//Step 1: Define some input field to plug into the form.
42
$text_input = $ui->input()->field()->text(
"Basic Input"
,
"Just some basic input"
);
43
44
//Step 2: Define some section carrying a title and description with the previously
45
//defined input
46
$section1 = $ui->input()->field()->section([$text_input],
"Section 1"
,
"Description of Section 1"
);
47
48
//Step 3: Define the form action to target the input processing
49
$DIC
->ctrl()->setParameterByClass(
50
'ilsystemstyledocumentationgui'
,
51
'example_name'
,
52
'base'
53
);
54
$form_action =
$DIC
->ctrl()->getFormActionByClass(
'ilsystemstyledocumentationgui'
);
55
56
//Step 4: Define the form and attach the section.
57
$form = $ui->input()->container()->form()->standard($form_action, [$section1]);
58
59
//Step 5: Render the form
60
return
$renderer
->render($form);
61
}
$renderer
$renderer
Definition:
build_bootstrap.php:83
ILIAS\UI\examples\Input\Container\Form\Standard
Definition:
base.php:21
ILIAS\UI\examples\Input\Container\Form\Standard\base
base()
Definition:
base.php:34
ILIAS\UI\examples\Layout\Page\Mail\$DIC
global $DIC
Definition:
base.php:55
components
ILIAS
UI
src
examples
Input
Container
Form
Standard
base.php
Generated on Sat Dec 13 2025 23:03:56 for ILIAS by
1.9.4 (using
Doxyfile
)