ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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->symbol()->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}
An exception for terminatinating execution or to throw for unit testing.
with_object_icon_and_actions()
$DIC
Definition: xapitoken.php:46