ILIAS  release_7 Revision v7.30-3-g800a261c036
base.php
Go to the documentation of this file.
1<?php
6function base()
7{
8 //Step 0: Declare dependencies
9 global $DIC;
10 $ui = $DIC->ui()->factory();
11 $renderer = $DIC->ui()->renderer();
12
13 //Step 1: Define some input field to plug into the form.
14 $text_input = $ui->input()->field()->text("Basic Input", "Just some basic input");
15
16 //Step 2: Define some section carrying a title and description with the previously
17 //defined input
18 $section1 = $ui->input()->field()->section([$text_input], "Section 1", "Description of Section 1");
19
20 //Step 3: Define the form and attach the section.
21 $form = $ui->input()->container()->form()->standard("", [$section1]);
22
23 //Step 4: Render the form
24 return $renderer->render($form);
25}
base()
Definition: base.php:4
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: goto.php:24