ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
xl_card.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
33function xl_card()
34{
35 //Init Factory and Renderer
36 global $DIC;
37 $f = $DIC->ui()->factory();
38 $renderer = $DIC->ui()->renderer();
39
40 //Generate some content
41 $content = $f->listing()->descriptive(
42 array(
43 "Entry 1" => "Some text",
44 "Entry 2" => "Some more text",
45 )
46 );
47
48 //Define the some responsive image
49 $image = $f->image()->responsive(
50 "./assets/images/logo/HeaderIcon.svg",
51 "Thumbnail Example"
52 );
53
54 //Define the card by using the content and the image
55 $card = $f->card()->standard(
56 "Title",
57 $image
58 )->withSections(array(
59 $content
60 ));
61
62 //Define the extra large deck
63 $deck = $f->deck(array($card,$card,$card))->withExtraLargeCardsSize();
64
65 //Render
66 return $renderer->render($deck);
67}
$renderer
global $DIC
Definition: shib_login.php:26