ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\examples\Item\Group Namespace Reference

Functions

 base ()
 

description: > Example for rendering a group item. More...

 
 with_actions ()
 

description: > Example for rendering a group item with actions. More...

 

Function Documentation

◆ base()

ILIAS\UI\examples\Item\Group\base ( )


description: > Example for rendering a group item.

expected output: > ILIAS shows a group with two items: "Item Title" and "Item Title 2". The group's heading is "Subtitle 1". Both items

have got an action menu.

Definition at line 33 of file base.php.

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

34 {
35  global $DIC;
36  $f = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38  $actions = $f->dropdown()->standard(array(
39  $f->button()->shy("ILIAS", "https://www.ilias.de"),
40  $f->button()->shy("GitHub", "https://www.github.com")
41  ));
42  $list_item1 = $f->item()->standard("Item Title")
43  ->withActions($actions)
44  ->withProperties(array(
45  "Origin" => "Course Title 1",
46  "Last Update" => "24.11.2011",
47  "Location" => "Room 123, Main Street 44, 3012 Bern"))
48  ->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.");
49 
50  $list_item2 = $f->item()->standard("Item 2 Title")
51  ->withActions($actions)
52  ->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.");
53 
54  $group = $f->item()->group("Subtitle 1", array(
55  $list_item1,
56  $list_item2
57  ));
58 
59  return $renderer->render($group);
60 }
$renderer
global $DIC
Definition: shib_login.php:22

◆ with_actions()

ILIAS\UI\examples\Item\Group\with_actions ( )


description: > Example for rendering a group item with actions.

expected output: > ILIAS shows a group with two items: "Item Title" and "Item Title 2". The group's heading is "Subtitle 1". Both items

have got an action menu. Additionally the group itself has got an action menu too.

Definition at line 33 of file with_actions.php.

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

Referenced by ilSystemStylesTableGUI\setWithActions().

34 {
35  global $DIC;
36  $f = $DIC->ui()->factory();
37  $renderer = $DIC->ui()->renderer();
38  $actions = $f->dropdown()->standard(array(
39  $f->button()->shy("ILIAS", "https://www.ilias.de"),
40  $f->button()->shy("GitHub", "https://www.github.com")
41  ));
42  $list_item1 = $f->item()->standard("Item Title")
43  ->withActions($actions)
44  ->withProperties(array(
45  "Origin" => "Course Title 1",
46  "Last Update" => "24.11.2011",
47  "Location" => "Room 123, Main Street 44, 3012 Bern"))
48  ->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.");
49 
50  $list_item2 = $f->item()->standard("Item 2 Title")
51  ->withActions($actions)
52  ->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.");
53 
54  $group_actions = $f->dropdown()->standard(array(
55  $f->button()->shy("Features", "https://feature.ilias.de"),
56  $f->button()->shy("Bugs", "https://www.ilias.de/mantis/")
57  ));
58 
59  $group = $f->item()->group("Subtitle 1", array(
60  $list_item1,
61  $list_item2
62  ))->withActions($group_actions);
63 
64  return $renderer->render($group);
65 }
$renderer
global $DIC
Definition: shib_login.php:22
+ Here is the caller graph for this function: