ILIAS  release_8 Revision v8.24
with_object_icon.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
6
8{
9 //Init Factory and Renderer
10 global $DIC;
11 $f = $DIC->ui()->factory();
12 $renderer = $DIC->ui()->renderer();
13
14 $icon = $f->symbol()->icon()->standard("crs", 'Course');
15
16 $image = $f->image()->responsive(
17 "./templates/default/images/HeaderIcon.svg",
18 "Thumbnail Example"
19 );
20
21 $content = $f->listing()->descriptive(
22 array(
23 "Entry 1" => "Some text",
24 "Entry 2" => "Some more text",
25 )
26 );
27
28 $card = $f->card()->repositoryObject(
29 "Title",
30 $image
31 )->withObjectIcon(
32 $icon
33 )->withSections(
34 array(
35 $content,
36 $content
37 )
38 );
39 //Render
40 return $renderer->render($card);
41}
global $DIC
Definition: feed.php:28