ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_object_icon_and_certificate.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
17 {
18  //Init Factory and Renderer
19  global $DIC;
20  $f = $DIC->ui()->factory();
21  $renderer = $DIC->ui()->renderer();
22 
23  $icon = $f->symbol()->icon()->standard("crs", 'Course');
24 
25  $content = $f->listing()->descriptive(
26  array(
27  "Entry 1" => "Some text",
28  "Entry 2" => "Some more text",
29  )
30  );
31 
32  $image = $f->image()->responsive(
33  "./assets/images/logo/HeaderIcon.svg",
34  "Thumbnail Example"
35  );
36 
37  $card = $f->card()->repositoryObject(
38  "Title",
39  $image
40  )->withObjectIcon(
41  $icon
42  )->withCertificateIcon(
43  true
44  )->withSections(
45  array(
46  $content,
47  $content,
48  )
49  );
50 
51  //Render
52  return $renderer->render($card);
53 }
$renderer
with_object_icon_and_certificate()
description: > Example for rendering a repository card with an icon and certificate ...
global $DIC
Definition: shib_login.php:25