ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
with_lead_avatar.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
10 function with_lead_avatar()
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  $app_item1 = $f->item()->standard("Max Mustermann")
20  ->withActions($actions)
21  ->withProperties(array(
22  "Last Login" => "24.11.2011",
23  "Location" => "Hamburg"))
24  ->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.")
25  ->withLeadAvatar($f->symbol()->avatar()->letter('mm'));
26  $app_item2 = $f->item()->standard("Erika Mustermann")
27  ->withActions($actions)
28  ->withProperties(array(
29  "Last Login" => "3.12.2018",
30  "Location" => "Berlin"))
31  ->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.")
32  ->withLeadAvatar($f->symbol()->avatar()->picture('./templates/default/images/no_photo_xsmall.jpg', 'demo.user'));
33  return $renderer->render([$app_item1, $f->divider()->horizontal(), $app_item2]);
34 }
with_lead_avatar()
With Lead Avatar.
global $DIC
Definition: feed.php:28