ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
base.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
36function 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
global $DIC
Definition: shib_login.php:26