ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
base.php
Go to the documentation of this file.
1 <?php
2 
3 /* Copyright (c) 2016 Timon Amstutz <timon.amstutz@ilub.unibe.ch> Extended GPL, see docs/LICENSE */
4 
5 function base()
6 {
7  //Init Factory and Renderer
8  global $DIC;
9  $f = $DIC->ui()->factory();
10  $renderer = $DIC->ui()->renderer();
11 
12  //Generate some content
13  $content = $f->listing()->descriptive(
14  array(
15  "Entry 1" => "Some text",
16  "Entry 2" => "Some more text",
17  )
18  );
19 
20  //Define the some responsive image
21  $image = $f->image()->responsive(
22  "./templates/default/images/HeaderIcon.svg",
23  "Thumbnail Example"
24  );
25 
26  //Define the card by using the content and the image
27  $card = $f->card(
28  "Title",
29  $image
30  )->withSections(array(
31  $content,
32  ));
33 
34  //Define the deck
35  $deck = $f->deck(array($card,$card,$card,$card,$card,
36  $card,$card,$card,$card));
37 
38  //Render
39  return $renderer->render($deck);
40 }
global $DIC
Definition: saml.php:7
base()
Definition: base.php:2
Create styles array
The data for the language used.