ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
base.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
34 function base()
35 {
36  global $DIC;
37  $factory = $DIC->ui()->factory();
38  $renderer = $DIC->ui()->renderer();
39 
40  $actions = $factory->dropdown()->standard(array(
41  $factory->button()->shy("ILIAS", "https://www.ilias.de"),
42  $factory->button()->shy("GitHub", "https://www.github.com")
43  ));
44 
45  $list_item1 = $factory->item()->standard("Item Title")
46  ->withActions($actions)
47  ->withProperties(array(
48  "Origin" => "Course Title 1",
49  "Last Update" => "24.11.2011",
50  "Location" => "Room 123, Main Street 44, 3012 Bern"))
51  ->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.");
52 
53  $list_item2 = $factory->item()->standard("Item 2 Title")
54  ->withActions($actions)
55  ->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.");
56 
57  $list_item3 = $factory->item()->standard("Item 3 Title")
58  ->withActions($actions)
59  ->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.");
60 
61  $items = array(
62  $factory->item()->group("Listing Subtitle 1", array(
63  $list_item1,
64  $list_item2
65  )),
66  $factory->item()->group("Listing Subtitle 2", array(
67  $list_item3
68  )));
69 
70  $panel = $factory->panel()->secondary()->listing("Listing panel Title", $items)->withActions($actions);
71 
72  return $renderer->render($panel);
73 }
$renderer
base()
description: > Example for rendering a panel secondary listing.
Definition: base.php:34
global $DIC
Definition: shib_login.php:22