ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
with_image_action.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 
5 function with_image_action()
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  $image = $f->image()->responsive(
15  "./templates/default/images/HeaderIcon.svg",
16  "Thumbnail Example"
17  );
18 
19  $url = "http://ilias.de";
20 
21  $content = $f->listing()->descriptive(
22  array(
23  "Entry 1" => "Some text",
24  "Entry 2" => "Some more text",
25  )
26  );
27 
28  $card = $f->card()->repositoryObject(
29  "Title",
30  $image
31  )->withObjectIcon(
32  $icon
33  )->withSections(
34  array(
35  $content,
36  $content
37  )
38  )->withImageAction(
39  $url
40  );
41  //Render
42  return $renderer->render($card);
43 }
global $DIC
Definition: saml.php:7
with_image_action()
$url