ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
with_object_icon_and_actions.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
18 {
19  //Init Factory and Renderer
20  global $DIC;
21  $f = $DIC->ui()->factory();
22  $renderer = $DIC->ui()->renderer();
23 
24  $icon = $f->symbol()->icon()->standard("crs", 'Course');
25 
26  $items = array(
27  $f->button()->shy("Go to Course", "#"),
28  $f->button()->shy("Go to Portfolio", "#"),
29  $f->divider()->horizontal(),
30  $f->button()->shy("ilias.de", "http://www.ilias.de")
31  );
32 
33  $dropdown = $f->dropdown()->standard($items);
34 
35  $content = $f->listing()->descriptive(
36  array(
37  "Entry 1" => "Some text",
38  "Entry 2" => "Some more text",
39  )
40  );
41 
42  $image = $f->image()->responsive(
43  "./assets/images/logo/HeaderIcon.svg",
44  "Thumbnail Example"
45  );
46 
47  $card = $f->card()->repositoryObject(
48  "Title",
49  $image
50  )->withActions(
51  $dropdown
52  )->withObjectIcon(
53  $icon
54  )->withSections(
55  array(
56  $content,
57  $content,
58  $content
59  )
60  );
61 
62  //Render
63  return $renderer->render($card);
64 }
$renderer
global $DIC
Definition: shib_login.php:25
with_object_icon_and_actions()
description: > Example for rendering a repository card with an object icon title action...