ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
with_viewcontrollers.php File Reference

Go to the source code of this file.

Functions

 with_viewcontrollers ()
 

Function Documentation

◆ with_viewcontrollers()

with_viewcontrollers ( )

Definition at line 3 of file with_viewcontrollers.php.

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) @$_GET[$parameter_name];
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}
$_GET["client_id"]
$factory
Definition: metadata.php:58
$url
$DIC
Definition: xapitoken.php:46

References $_GET, $DIC, $factory, and $url.