ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
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 
7 function repository()
8 {
9  //Init Factory and Renderer
10  global $DIC;
11  $f = $DIC->ui()->factory();
12  $renderer = $DIC->ui()->renderer();
13 
14  $icon = $f->symbol()->icon()->standard('crs', 'Course');
15 
16  $items = array(
17  $f->button()->shy("Go to Course", "#"),
18  $f->button()->shy("Go to Portfolio", "#"),
19  $f->divider()->horizontal(),
20  $f->button()->shy("ilias.de", "http://www.ilias.de")
21  );
22 
23  $dropdown = $f->dropdown()->standard($items);
24 
25 
26  $content = $f->listing()->descriptive(
27  array(
28  "Entry 1" => "Some text",
29  "Entry 2" => "Some more text",
30  )
31  );
32 
33  $image = $f->image()->responsive(
34  "./templates/default/images/HeaderIcon.svg",
35  "Thumbnail Example"
36  );
37 
38  $card = $f->card()->repositoryObject(
39  "Title",
40  $image
41  )->withObjectIcon(
42  $icon
43  )->withActions(
44  $dropdown
45  )->withCertificateIcon(
46  true
47  )->withSections(
48  array(
49  $content,
50  $content,
51  )
52  );
53 
54  //Define the deck
55  $deck = $f->deck(array($card,$card,$card,$card,$card,
56  $card,$card,$card,$card))->withNormalCardsSize();
57 
58  //Render
59  return $renderer->render($deck);
60 }
global $DIC
Definition: feed.php:28