ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
with_disabled.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
32 function 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
with_disabled()
description: > Example showing how a dependent group (aka sub form) might be attached to a radio whi...
global $DIC
Definition: shib_login.php:22