ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
with_disabled.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
32function with_disabled()
33{
34 global $DIC;
35 $ui = $DIC->ui()->factory();
36 $renderer = $DIC->ui()->renderer();
37 $request = $DIC->http()->request();
38 $data = new \ILIAS\Data\Factory();
39
40 $group1 = $ui->input()->field()->group([$ui->input()->field()->text("Item 1", "Just some field")], "Group 1");
41 $group2 = $ui->input()->field()->group([$ui->input()->field()->text("Item 2", "Just some field")], "Group 2");
42
43 $sg = $ui->input()->field()->switchableGroup(
44 [$group1,$group2],
45 "Disabled Switchable Group",
46 "nothing to pick here."
47 )
48 ->withDisabled(true);
49
50 return $renderer->render($sg);
51}
$renderer
global $DIC
Definition: shib_login.php:26