ILIAS  release_10 Revision v10.1-43-ga1241a92c2f
repository.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 namespace ILIAS\UI\examples\Deck;
6 
17 function repository()
18 {
19  //Init Factory and Renderer
20  global $DIC;
21  $f = $DIC->ui()->factory();
22  $renderer = $DIC->ui()->renderer();
23 
24  $icon = $f->symbol()->icon()->standard('crs', 'Course');
25 
26  $items = array(
27  $f->button()->shy("Go to Course", "#"),
28  $f->button()->shy("Go to Portfolio", "#"),
29  $f->divider()->horizontal(),
30  $f->button()->shy("ilias.de", "http://www.ilias.de")
31  );
32 
33  $dropdown = $f->dropdown()->standard($items);
34 
35 
36  $content = $f->listing()->descriptive(
37  array(
38  "Entry 1" => "Some text",
39  "Entry 2" => "Some more text",
40  )
41  );
42 
43  $image = $f->image()->responsive(
44  "./assets/images/logo/HeaderIcon.svg",
45  "Thumbnail Example"
46  );
47 
48  $card = $f->card()->repositoryObject(
49  "Title",
50  $image
51  )->withObjectIcon(
52  $icon
53  )->withActions(
54  $dropdown
55  )->withCertificateIcon(
56  true
57  )->withSections(
58  array(
59  $content,
60  $content,
61  )
62  );
63 
64  //Define the deck
65  $deck = $f->deck(array($card,$card,$card,$card,$card,
66  $card,$card,$card,$card))->withNormalCardsSize();
67 
68  //Render
69  return $renderer->render($deck);
70 }
$renderer
repository()
description: > Example for rendering a repository card
Definition: repository.php:17
global $DIC
Definition: shib_login.php:25