ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
base.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
6 
17 function base()
18 {
19  //Init Factory and Renderer
20  global $DIC;
21  $f = $DIC->ui()->factory();
22  $renderer = $DIC->ui()->renderer();
23 
24  //Generate some content
25  $content = $f->listing()->descriptive(
26  array(
27  "Entry 1" => "Some text",
28  "Entry 2" => "Some more text",
29  )
30  );
31 
32  //Define the some responsive image
33  $image = $f->image()->responsive(
34  "./assets/images/logo/HeaderIcon.svg",
35  "Thumbnail Example"
36  );
37 
38  //Define the card by using the content and the image
39  $card = $f->card()->standard(
40  "Title",
41  $image
42  )->withSections(array(
43  $content,
44  ));
45 
46  //Define the deck
47  $deck = $f->deck(array($card,$card,$card,$card,$card,
48  $card,$card,$card,$card));
49 
50  //Render
51  return $renderer->render($deck);
52 }
$renderer
base()
description: > Example for rendering a base deck.
Definition: base.php:17
global $DIC
Definition: shib_login.php:25