ILIAS  release_7 Revision v7.30-3-g800a261c036
with_object_icon.php
Go to the documentation of this file.
1<?php
2
3/* Copyright (c) 2018 Jesús López <lopez@leifos.com> Extended GPL, see docs/LICENSE */
4
6{
7 //Init Factory and Renderer
8 global $DIC;
9 $f = $DIC->ui()->factory();
10 $renderer = $DIC->ui()->renderer();
11
12 $icon = $f->symbol()->icon()->standard("crs", 'Course')->withIsOutlined(true);
13
14 $image = $f->image()->responsive(
15 "./templates/default/images/HeaderIcon.svg",
16 "Thumbnail Example"
17 );
18
19 $content = $f->listing()->descriptive(
20 array(
21 "Entry 1" => "Some text",
22 "Entry 2" => "Some more text",
23 )
24 );
25
26 $card = $f->card()->repositoryObject(
27 "Title",
28 $image
29 )->withObjectIcon(
30 $icon
31 )->withSections(
32 array(
33 $content,
34 $content
35 )
36 );
37 //Render
38 return $renderer->render($card);
39}
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: goto.php:24
with_object_icon()