ILIAS  release_8 Revision v8.24
base.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
6
7function base()
8{
9 global $DIC;
10 $ui = $DIC->ui()->factory();
11 $renderer = $DIC->ui()->renderer();
12 $request = $DIC->http()->request();
13
14 $link_input = $ui->input()->field()->link("Link Input", "Enter a label and the url ")
15 ->withValue(['ILIAS Homepage', "https://www.ilias.de/"]);
16
17 $form = $ui->input()->container()->form()->standard("#", [$link_input]);
18
19 if ($request->getMethod() == "POST") {
20 $form = $form->withRequest($request);
21 $result = $form->getData()[0];
22 } else {
23 $result = "No result yet.";
24 }
25
26 return
27 "<pre>" . print_r($result, true) . "</pre><br />" .
28 $renderer->render($form);
29}
global $DIC
Definition: feed.php:28