ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
with_disabled.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
7 function with_disabled()
8 {
9  global $DIC;
10  $ui = $DIC->ui()->factory();
11  $renderer = $DIC->ui()->renderer();
12  $request = $DIC->http()->request();
13  $data = new \ILIAS\Data\Factory();
14 
15  $group1 = $ui->input()->field()->group([$ui->input()->field()->text("Item 1", "Just some field")], "Group 1");
16  $group2 = $ui->input()->field()->group([$ui->input()->field()->text("Item 2", "Just some field")], "Group 2");
17 
18  $sg = $ui->input()->field()->switchableGroup(
19  [$group1,$group2],
20  "Disabled Switchable Group",
21  "nothing to pick here."
22  )
23  ->withDisabled(true);
24 
25  return $renderer->render($sg);
26 }
global $DIC
Definition: feed.php:28