19 declare(strict_types=1);
36 $f = $DIC->ui()->factory();
41 $url = $DIC->http()->request()->getRequestTarget();
43 $actions =
$f->dropdown()->standard([
44 $f->button()->shy(
"ILIAS",
"https://www.ilias.de"),
45 $f->button()->shy(
"GitHub",
"https://www.github.com")
47 $current_sortation =
'abc';
52 $sortation_options = [
53 'abc' =>
'Sort by Alphabet',
54 'date' =>
'Sort by Date',
55 'location' =>
'Sort by Location' 57 $sortation =
$f->viewControl()->sortation($sortation_options, $current_sortation)
58 ->withTargetURL(
$url,
"sort");
60 $current_presentation =
'list';
64 $presentation_options = [
65 'list' =>
'List View',
68 $modes =
$f->viewControl()->mode(
70 array_keys($presentation_options),
71 static function ($carry, $item) use ($presentation_options,
$url) {
72 $carry[$presentation_options[$item]] =
"$url&mode=$item";
79 ->withActive($presentation_options[$current_presentation]);
85 $pagination =
$f->viewControl()->pagination()
86 ->withTargetURL(
$url,
"page")
87 ->withTotalEntries(98)
89 ->withCurrentPage($current_page);
97 if ($current_presentation ===
'list') {
98 $item1 =
$f->item()->standard(
"Item Title")
99 ->withActions($actions)
101 "Origin" =>
"Course Title 1",
102 "Last Update" =>
"24.11.2011",
103 "Location" =>
"Room 123, Main Street 44, 3012 Bern" 106 "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua." 109 $item2 =
$f->item()->standard(
"Item 2 Title")
110 ->withActions($actions)
112 "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua." 115 $item3 =
$f->item()->standard(
"Item 3 Title")
116 ->withActions($actions)
118 "Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua." 121 $image =
$f->image()->responsive(
122 "./assets/images/logo/HeaderIcon.svg",
125 $content =
$f->listing()->descriptive(
127 "Entry 1" =>
"Some text",
128 "Entry 2" =>
"Some more text",
131 $item1 = $item2 = $item3 =
$f->card()->standard(
"Item Title", $image)
132 ->withSections([$content]);
135 $std_list =
$f->panel()->standard(
"List Title", [
136 $f->item()->group(
"Subtitle 1", [
140 $f->item()->group(
"Subtitle 2", [
144 ->withActions($actions)
145 ->withViewControls($view_controls);
with_view_controls()
description: > Example for rendering a standard panel with an all view control.