3 declare(strict_types=1);
23 $factory = $DIC->ui()->factory();
25 $url = $DIC->http()->request()->getRequestTarget();
29 $parameter_name =
'page3';
35 $pagination = $factory->viewControl()->pagination()
36 ->withTargetURL(
$url, $parameter_name)
37 ->withTotalEntries(102)
40 ->withCurrentPage($current_page);
42 $custom_pagination = $pagination
43 ->withDropdownLabel(
'current page is %1$d (of %2$d pages in total)');
45 list($range_offset, $range_length) = $pagination->getRange()->unpack();
46 $result =
"Show $range_length entries starting at $range_offset";
48 return $renderer->render([$pagination, $custom_pagination])