ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
many_pages_dropdown.php File Reference

Go to the source code of this file.

Functions

 many_pages_dropdown ()
 

Function Documentation

◆ many_pages_dropdown()

many_pages_dropdown ( )

Definition at line 3 of file many_pages_dropdown.php.

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

4 {
5  global $DIC;
6  $factory = $DIC->ui()->factory();
7  $renderer = $DIC->ui()->renderer();
8  $url = $DIC->http()->request()->getRequestTarget();
9 
10  $parameter_name = 'page2';
11  $current_page = (int) @$_GET[$parameter_name];
12 
13  $pagination = $factory->viewControl()->pagination()
14  ->withTargetURL($url, $parameter_name)
15  ->withTotalEntries(102)
16  ->withPageSize(10)
17  ->withDropdownAt(5)
18  ->withCurrentPage($current_page);
19 
20  $start = $pagination->getOffset();
21  $stop = $start + $pagination->getPageLength();
22  $result = "entries $start to $stop";
23  return $renderer->render($pagination)
24  . '<hr>'
25  . $result;
26 }
$result
global $DIC
Definition: saml.php:7
$_GET["client_id"]
$factory
Definition: metadata.php:43
$start
Definition: bench.php:8
$url