ILIAS  release_8 Revision v8.23
with_object_icon_and_actions.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
8 {
9  //Init Factory and Renderer
10  global $DIC;
11  $f = $DIC->ui()->factory();
12  $renderer = $DIC->ui()->renderer();
13 
14  $icon = $f->symbol()->icon()->standard("crs", 'Course');
15 
16  $items = array(
17  $f->button()->shy("Go to Course", "#"),
18  $f->button()->shy("Go to Portfolio", "#"),
19  $f->divider()->horizontal(),
20  $f->button()->shy("ilias.de", "http://www.ilias.de")
21  );
22 
23  $dropdown = $f->dropdown()->standard($items);
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  "./templates/default/images/HeaderIcon.svg",
34  "Thumbnail Example"
35  );
36 
37  $card = $f->card()->repositoryObject(
38  "Title",
39  $image
40  )->withActions(
41  $dropdown
42  )->withObjectIcon(
43  $icon
44  )->withSections(
45  array(
46  $content,
47  $content,
48  $content
49  )
50  );
51 
52  //Render
53  return $renderer->render($card);
54 }
global $DIC
Definition: feed.php:28