ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
user.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 namespace ILIAS\UI\examples\Deck;
6 
7 function user()
8 {
9  //Init Factory and Renderer
10  global $DIC;
11  $f = $DIC->ui()->factory();
12  $renderer = $DIC->ui()->renderer();
13 
14  $address = $f->listing()->descriptive(
15  array(
16  "Address" => "Hochschlustrasse 6",
17  "" => "3006 Bern",
18  "Contact" => "timon.amstutz@ilub.unibe.ch"
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 image and add a new section with a button
29  $card = $f->card()->standard(
30  "Timon Amstutz",
31  $image
32  )->withSections(array($address,$f->button()->standard("Request Contact", "")));
33 
34  //Create a deck with large cards
35  $deck = $f->deck(array($card,$card,$card,$card,$card,$card,$card))->withLargeCardsSize();
36 
37  //Render
38  return $renderer->render($deck);
39 }
global $DIC
Definition: feed.php:28