ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\Examples\Panel\Sub Namespace Reference

Functions

 with_actions ()
 

description: > Example for rendering a sub panel with actions. More...

 
 with_card ()
 

description: > Example for rendering a sub panel with a card. More...

 
 with_secondary_panel ()
 

expected output: > ILIAS shows a standard panel including a sub panel. More...

 

Function Documentation

◆ with_actions()

ILIAS\UI\Examples\Panel\Sub\with_actions ( )


description: > Example for rendering a sub panel with actions.

expected output: > ILIAS shows a standard panel including a sub panel. Additionally an action menu is displayed on the right side of the

sub-panel title.

Definition at line 33 of file with_actions.php.

References $DIC, Vendor\Package\$f, and $renderer.

34 {
35  global $DIC;
36  $f = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38 
39  $actions = $f->dropdown()->standard(array(
40  $f->button()->shy("ILIAS", "https://www.ilias.de"),
41  $f->button()->shy("GitHub", "https://www.github.com")
42  ));
43 
44  $block = $f->panel()->standard(
45  "Panel Title",
46  $f->panel()->sub("Sub Panel Title", $f->legacy()->content("Some Content"))->withActions($actions)
47  );
48 
49  return $renderer->render($block);
50 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_card()

ILIAS\UI\Examples\Panel\Sub\with_card ( )


description: > Example for rendering a sub panel with a card.

expected output: > ILIAS shows a standard panel with a sub panel. Additionally a card is displayed on the right side of the sub panel

content.

Definition at line 33 of file with_card.php.

References $DIC, Vendor\Package\$f, and $renderer.

34 {
35  global $DIC;
36  $f = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38 
39  $block = $f->panel()->standard(
40  "Panel Title",
41  $f->panel()->sub("Sub Panel Title", $f->legacy()->content("Some Content"))
42  ->withFurtherInformation($f->card()->standard("Card Heading")->withSections(array($f->legacy()->content("Card Content"))))
43  );
44 
45  return $renderer->render($block);
46 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_secondary_panel()

ILIAS\UI\Examples\Panel\Sub\with_secondary_panel ( )


expected output: > ILIAS shows a standard panel including a sub panel.

Additionally a seconday panel is rendered in the right side

of the sub panel content area.

Definition at line 30 of file with_secondary_panel.php.

References $DIC, Vendor\Package\$f, and $renderer.

31 {
32  global $DIC;
33  $f = $DIC->ui()->factory();
34  $renderer = $DIC->ui()->renderer();
35 
36  $actions = $f->dropdown()->standard(array(
37  $f->button()->shy("ILIAS", "https://www.ilias.de"),
38  $f->button()->shy("GitHub", "https://www.github.com")
39  ));
40 
41  $list_item1 = $f->item()->standard("Item Title")
42  ->withActions($actions)
43  ->withProperties(array(
44  "Origin" => "Course Title 1",
45  "Last Update" => "24.11.2011",
46  "Location" => "Room 123, Main Street 44, 3012 Bern"))
47  ->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.");
48 
49  $list_item2 = $f->item()->standard("Item 2 Title")
50  ->withActions($actions)
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_item3 = $f->item()->standard("Item 3 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  $items = array(
58  $f->item()->group("Listing Subtitle 1", array(
59  $list_item1,
60  $list_item2
61  )),
62  $f->item()->group("Listing Subtitle 2", array(
63  $list_item3
64  )));
65 
66  $panel = $f->panel()->secondary()->listing("Listing panel Title", $items)->withActions($actions);
67 
68  $block = $f->panel()->standard(
69  "Panel Title",
70  $f->panel()->sub("Sub Panel Title", $f->legacy()->content("Some Content"))
71  ->withFurtherInformation($panel)
72  );
73 
74  return $renderer->render($block);
75 }
$renderer
global $DIC
Definition: shib_login.php:22