7 $renderer = $DIC->ui()->renderer();
8 $url = $DIC->http()->request()->getRequestTarget();
11 $parameter_name =
'page3';
12 $current_page = (int) (array_key_exists($parameter_name,
$_GET) ?
$_GET[$parameter_name] : 0);
14 $pagination =
$factory->viewControl()->pagination()
15 ->withTargetURL(
$url, $parameter_name)
16 ->withTotalEntries(102)
19 ->withCurrentPage($current_page);
21 $custom_pagination = $pagination
22 ->withDropdownLabel(
'current page is %1$d (of %2$d pages in total)');
24 list($range_offset, $range_length) = $pagination->getRange()->unpack();
25 $result =
"Show $range_length entries starting at $range_offset";
27 return $renderer->render([$pagination, $custom_pagination])