ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
disabled.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
35function disabled()
36{
37 //Step 0: Declare dependencies
38 global $DIC;
39 $ui = $DIC->ui()->factory();
40 $renderer = $DIC->ui()->renderer();
41
42 //Step 1: Define the text input field
43 $text_input = $ui->input()->field()->text("Disabled Input", "Just some disabled input")->withDisabled(true);
44
45 //Step 2: Define the form and attach the section.
46 $form = $ui->input()->container()->form()->standard("#", [$text_input]);
47
48 //Step 4: Render the form with the text input field
49 return $renderer->render($form);
50}
$renderer
global $DIC
Definition: shib_login.php:26