ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 
5 function with_object_icon()
6 {
7  //Init Factory and Renderer
8  global $DIC;
9  $f = $DIC->ui()->factory();
10  $renderer = $DIC->ui()->renderer();
11 
12  $icon = $f->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 }
with_object_icon()
global $DIC
Definition: saml.php:7