ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_secondary_panel.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
15 {
16  global $DIC;
17  $f = $DIC->ui()->factory();
18  $renderer = $DIC->ui()->renderer();
19 
20  $actions = $f->dropdown()->standard(array(
21  $f->button()->shy("ILIAS", "https://www.ilias.de"),
22  $f->button()->shy("GitHub", "https://www.github.com")
23  ));
24 
25  $list_item1 = $f->item()->standard("Item Title")
26  ->withActions($actions)
27  ->withProperties(array(
28  "Origin" => "Course Title 1",
29  "Last Update" => "24.11.2011",
30  "Location" => "Room 123, Main Street 44, 3012 Bern"))
31  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
32 
33  $list_item2 = $f->item()->standard("Item 2 Title")
34  ->withActions($actions)
35  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
36 
37  $list_item3 = $f->item()->standard("Item 3 Title")
38  ->withActions($actions)
39  ->withDescription("Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua.");
40 
41  $items = array(
42  $f->item()->group("Listing Subtitle 1", array(
43  $list_item1,
44  $list_item2
45  )),
46  $f->item()->group("Listing Subtitle 2", array(
47  $list_item3
48  )));
49 
50  $panel = $f->panel()->secondary()->listing("Listing panel Title", $items)->withActions($actions);
51 
52  $block = $f->panel()->standard(
53  "Panel Title",
54  $f->panel()->sub("Sub Panel Title", $f->legacy("Some Content"))
55  ->withFurtherInformation($panel)
56  );
57 
58  return $renderer->render($block);
59 }
$renderer
with_secondary_panel()
expected output: > ILIAS shows a standard panel including a sub panel.
global $DIC
Definition: shib_login.php:25