ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
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 
18 function user()
19 {
20  //Init Factory and Renderer
21  global $DIC;
22  $f = $DIC->ui()->factory();
23  $renderer = $DIC->ui()->renderer();
24 
25  $address = $f->listing()->descriptive(
26  array(
27  "Address" => "Hochschlustrasse 6",
28  "" => "3006 Bern",
29  "Contact" => "timon.amstutz@ilub.unibe.ch"
30  )
31  );
32 
33  //Define the some responsive image
34  $image = $f->image()->responsive(
35  "./assets/images/logo/HeaderIcon.svg",
36  "Thumbnail Example"
37  );
38 
39  //Define the card by using the image and add a new section with a button
40  $card = $f->card()->standard(
41  "Timon Amstutz",
42  $image
43  )->withSections(array($address,$f->button()->standard("Request Contact", "")));
44 
45  //Create a deck with large cards
46  $deck = $f->deck(array($card,$card,$card,$card,$card,$card,$card))->withLargeCardsSize();
47 
48  //Render
49  return $renderer->render($deck);
50 }
user()
description: > Example for rendering a user card
Definition: user.php:18
$renderer
global $DIC
Definition: shib_login.php:25