ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_main_action.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
19 function with_main_action()
20 {
21  global $DIC;
22  $f = $DIC->ui()->factory();
23  $renderer = $DIC->ui()->renderer();
24  $actions = $f->dropdown()->standard(array(
25  $f->button()->shy("ILIAS", "https://www.ilias.de"),
26  $f->button()->shy("GitHub", "https://www.github.com")
27  ));
28  $main_action = $f->button()->standard("Edit", "#");
29  $app_item = $f->item()->standard("Item Title")
30  ->withActions($actions)
31  ->withMainAction($main_action)
32  ->withProperties(array(
33  "Origin" => "Course Title 1",
34  "Last Update" => "24.11.2011",
35  "Location" => "Room 123, Main Street 44, 3012 Bern"))
36  ->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.");
37  return $renderer->render($app_item);
38 }
$renderer
with_main_action()
description: > Example for rendering a standard item with main actions.
global $DIC
Definition: shib_login.php:25