ILIAS  release_7 Revision v7.30-3-g800a261c036
with_object_icon.php File Reference

Go to the source code of this file.

Functions

 with_object_icon ()
 

Function Documentation

◆ with_object_icon()

with_object_icon ( )

Definition at line 5 of file with_object_icon.php.

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}
global $DIC
Definition: goto.php:24

References $DIC, and Vendor\Package\$f.