ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
with_main_action.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
10 function with_main_action()
11 {
12  global $DIC;
13  $f = $DIC->ui()->factory();
14  $renderer = $DIC->ui()->renderer();
15  $actions = $f->dropdown()->standard(array(
16  $f->button()->shy("ILIAS", "https://www.ilias.de"),
17  $f->button()->shy("GitHub", "https://www.github.com")
18  ));
19  $main_action = $f->button()->standard("Edit", "#");
20  $app_item = $f->item()->standard("Item Title")
21  ->withActions($actions)
22  ->withMainAction($main_action)
23  ->withProperties(array(
24  "Origin" => "Course Title 1",
25  "Last Update" => "24.11.2011",
26  "Location" => "Room 123, Main Street 44, 3012 Bern"))
27  ->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.");
28  return $renderer->render($app_item);
29 }
global $DIC
Definition: feed.php:28