ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
with_object_icon_and_actions.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 
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  $items = array(
15  $f->button()->shy("Go to Course", "#"),
16  $f->button()->shy("Go to Portfolio", "#"),
17  $f->divider()->horizontal(),
18  $f->button()->shy("ilias.de", "http://www.ilias.de")
19  );
20 
21  $dropdown = $f->dropdown()->standard($items);
22 
23  $content = $f->listing()->descriptive(
24  array(
25  "Entry 1" => "Some text",
26  "Entry 2" => "Some more text",
27  )
28  );
29 
30  $image = $f->image()->responsive(
31  "./templates/default/images/HeaderIcon.svg",
32  "Thumbnail Example"
33  );
34 
35  $card = $f->card()->repositoryObject(
36  "Title",
37  $image
38  )->withActions(
39  $dropdown
40  )->withObjectIcon(
41  $icon
42  )->withSections(
43  array(
44  $content,
45  $content,
46  $content
47  )
48  );
49 
50  //Render
51  return $renderer->render($card);
52 }
global $DIC
Definition: saml.php:7
with_object_icon_and_actions()