ILIAS  release_7 Revision v7.30-3-g800a261c036
with_object_icon_and_certificate.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 $content = $f->listing()->descriptive(
15 array(
16 "Entry 1" => "Some text",
17 "Entry 2" => "Some more text",
18 )
19 );
20
21 $image = $f->image()->responsive(
22 "./templates/default/images/HeaderIcon.svg",
23 "Thumbnail Example"
24 );
25
26 $card = $f->card()->repositoryObject(
27 "Title",
28 $image
29 )->withObjectIcon(
30 $icon
31 )->withCertificateIcon(
32 true
33 )->withSections(
34 array(
35 $content,
36 $content,
37 )
38 );
39
40 //Render
41 return $renderer->render($card);
42}
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: goto.php:24