ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
with_object_icon_and_actions.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
34{
35 //Init Factory and Renderer
36 global $DIC;
37 $f = $DIC->ui()->factory();
38 $renderer = $DIC->ui()->renderer();
39
40 $icon = $f->symbol()->icon()->standard("crs", 'Course');
41
42 $items = array(
43 $f->button()->shy("Go to Course", "#"),
44 $f->button()->shy("Go to Portfolio", "#"),
45 $f->divider()->horizontal(),
46 $f->button()->shy("ilias.de", "http://www.ilias.de")
47 );
48
49 $dropdown = $f->dropdown()->standard($items);
50
51 $content = $f->listing()->descriptive(
52 array(
53 "Entry 1" => "Some text",
54 "Entry 2" => "Some more text",
55 )
56 );
57
58 $image = $f->image()->responsive(
59 "./assets/images/logo/HeaderIcon.svg",
60 "Thumbnail Example"
61 );
62
63 $card = $f->card()->repositoryObject(
64 "Title",
65 $image
66 )->withActions(
67 $dropdown
68 )->withObjectIcon(
69 $icon
70 )->withSections(
71 array(
72 $content,
73 $content,
74 $content
75 )
76 );
77
78 //Render
79 return $renderer->render($card);
80}
$renderer
global $DIC
Definition: shib_login.php:26