ILIAS  release_8 Revision v8.24
base.php
Go to the documentation of this file.
1<?php
2
3declare(strict_types=1);
4
6
7function base()
8{
9 //Init Factory and Renderer
10 global $DIC;
11 $f = $DIC->ui()->factory();
12 $renderer = $DIC->ui()->renderer();
13
14 //Generate some content
15 $content = $f->listing()->descriptive(
16 array(
17 "Entry 1" => "Some text",
18 "Entry 2" => "Some more text",
19 )
20 );
21
22 //Define the some responsive image
23 $image = $f->image()->responsive(
24 "./templates/default/images/HeaderIcon.svg",
25 "Thumbnail Example"
26 );
27
28 //Define the card by using the content and the image
29 $card = $f->card()->standard(
30 "Title",
31 $image
32 )->withSections(array(
33 $content,
34 ));
35
36 //Define the deck
37 $deck = $f->deck(array($card,$card,$card,$card,$card,
38 $card,$card,$card,$card));
39
40 //Render
41 return $renderer->render($deck);
42}
global $DIC
Definition: feed.php:28