Go to the source code of this file.
|
| base () |
| Example show how to create and render a basic textarea field and attach it to a form. More...
|
|
◆ base()
Example show how to create and render a basic textarea field and attach it to a form.
Definition at line 6 of file base.php.
7{
8
10 $ui =
$DIC->ui()->factory();
11 $renderer =
$DIC->ui()->renderer();
14
15
16 $textarea_input = $ui->input()->field()->textarea("Textarea Input", "Just a textarea input.");
17
18
19 $ctrl->setParameterByClass(
20 'ilsystemstyledocumentationgui',
21 'example_name',
22 'textarea'
23 );
24 $form_action =
$DIC->ctrl()->getFormActionByClass(
'ilsystemstyledocumentationgui');
25 $form = $ui->input()->container()->form()->standard($form_action, [$textarea_input]);
26
27
29 &&
$request->getQueryParams()[
'example_name'] ==
"textarea") {
32 } else {
34 }
35
36
37 return
38 "<pre>" . print_r(
$result,
true) .
"</pre><br/>" .
39 $renderer->render(
$form);
40}
foreach($paths as $path) $request
if(isset($_POST['submit'])) $form
References $DIC, $form, $request, and $result.