ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
xl_card.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\UI\examples\Deck;
22 
33 function 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
xl_card()
description: > Example for rendering a XL card
Definition: xl_card.php:33
global $DIC
Definition: shib_login.php:22