ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_lead_icon.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
19 function with_lead_icon()
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  $app_item = $f->item()->standard("ILIAS Course")
29  ->withActions($actions)
30  ->withProperties(array(
31  "Origin" => "Course Title 1",
32  "Last Update" => "24.11.2011",
33  "Location" => "Room 123, Main Street 44, 3012 Bern"))
34  ->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.")
35  ->withLeadIcon($f->symbol()->icon()->standard('crs', 'Course', 'medium'));
36  return $renderer->render($app_item);
37 }
$renderer
global $DIC
Definition: shib_login.php:25
with_lead_icon()
description: > Example for rendering a standard item with an lead icon.