ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
with_object_icon.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
33 function with_object_icon()
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  $image = $f->image()->responsive(
43  "./assets/images/logo/HeaderIcon.svg",
44  "Thumbnail Example"
45  );
46 
47  $content = $f->listing()->descriptive(
48  array(
49  "Entry 1" => "Some text",
50  "Entry 2" => "Some more text",
51  )
52  );
53 
54  $card = $f->card()->repositoryObject(
55  "Title",
56  $image
57  )->withObjectIcon(
58  $icon
59  )->withSections(
60  array(
61  $content,
62  $content
63  )
64  );
65  //Render
66  return $renderer->render($card);
67 }
$renderer
with_object_icon()
description: > Example for rendering a repository card with an object icon
global $DIC
Definition: shib_login.php:22