ILIAS  trunk Revision v11.0_alpha-1715-g7fc467680fb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
base.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
32 function base()
33 {
34  //Step 0: Declare dependencies.
35  global $DIC;
36  $ui = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38 
39  //Step 1: Define the input field.
40  $pwd_input = $ui->input()->field()->password("Password", "enter your password here");
41 
42  //Step 2: Define the form and attach the field.
43  $form = $ui->input()->container()->form()->standard("#", [$pwd_input]);
44 
45  //Step 4: Render the form.
46  return $renderer->render($form);
47 }
$renderer
base()
description: > Example of how to create and render a basic password field and attach it to a form...
Definition: base.php:32
global $DIC
Definition: shib_login.php:22