ILIAS  trunk Revision v11.0_alpha-1723-g8e69f309bab
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
user.php
Go to the documentation of this file.
1 <?php
2 
19 declare(strict_types=1);
20 
21 namespace ILIAS\UI\examples\Deck;
22 
34 function user()
35 {
36  //Init Factory and Renderer
37  global $DIC;
38  $f = $DIC->ui()->factory();
39  $renderer = $DIC->ui()->renderer();
40 
41  $address = $f->listing()->descriptive(
42  array(
43  "Address" => "Hochschlustrasse 6",
44  "" => "3006 Bern",
45  "Contact" => "timon.amstutz@ilub.unibe.ch"
46  )
47  );
48 
49  //Define the some responsive image
50  $image = $f->image()->responsive(
51  "./assets/images/logo/HeaderIcon.svg",
52  "Thumbnail Example"
53  );
54 
55  //Define the card by using the image and add a new section with a button
56  $card = $f->card()->standard(
57  "Timon Amstutz",
58  $image
59  )->withSections(array($address,$f->button()->standard("Request Contact", "")));
60 
61  //Create a deck with large cards
62  $deck = $f->deck(array($card,$card,$card,$card,$card,$card,$card))->withLargeCardsSize();
63 
64  //Render
65  return $renderer->render($deck);
66 }
user()
description: > Example for rendering a user card
Definition: user.php:34
$renderer
global $DIC
Definition: shib_login.php:22