ILIAS  release_7 Revision v7.30-3-g800a261c036
with_viewcontrollers.php
Go to the documentation of this file.
1<?php
2
4{
5 global $DIC;
6
7 $factory = $DIC->ui()->factory();
8 $renderer = $DIC->ui()->renderer();
9
10 $actions = $factory->dropdown()->standard(array(
11 $factory->button()->shy("ILIAS", "https://www.ilias.de"),
12 $factory->button()->shy("GitHub", "https://www.github.com")
13 ));
14
15 $legacy = $factory->legacy("Legacy content");
16
17 $sort_options = array(
18 'internal_rating' => 'Best',
19 'date_desc' => 'Most Recent',
20 'date_asc' => 'Oldest',
21 );
22 $sortation = $factory->viewControl()->sortation($sort_options);
23
24
25 $url = $DIC->http()->request()->getRequestTarget();
26
27 $parameter_name = 'page';
28 $current_page = (int) (array_key_exists($parameter_name, $_GET) ? $_GET[$parameter_name] : 0);
29
30 $pagination = $factory->viewControl()->pagination()
31 ->withTargetURL($url, $parameter_name)
32 ->withTotalEntries(98)
33 ->withPageSize(10)
34 ->withCurrentPage($current_page);
35
36 $panel = $factory->panel()->secondary()->legacy("panel title", $legacy)->withViewControls(array($sortation, $pagination))->withActions($actions);
37
38 return $renderer->render($panel);
39}
with_viewcontrollers()
$_GET["client_id"]
An exception for terminatinating execution or to throw for unit testing.
global $DIC
Definition: goto.php:24
if(isset($_FILES['img_file']) &&is_array($_FILES['img_file'])) $panel
Definition: imgupload.php:138
$factory
Definition: metadata.php:58
$url