ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
base.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
22 
33 function base()
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 deck
63  $deck = $f->deck(array($card,$card,$card,$card,$card,
64  $card,$card,$card,$card));
65 
66  //Render
67  return $renderer->render($deck);
68 }
$renderer
base()
description: > Example for rendering a base deck.
Definition: base.php:33
global $DIC
Definition: shib_login.php:22