public function ControllerBase::setupPager in MongoDB 8.2
Set up the pager.
Parameters
\Symfony\Component\HttpFoundation\Request $request: The current request.
int $count: The total number of possible rows.
Return value
int The number of the page to display, starting at 0.
4 calls to ControllerBase::setupPager()
- DetailController::getRowData in modules/
mongodb_watchdog/ src/ Controller/ DetailController.php - Obtain the data from the logger.
- OverviewController::getRowData in modules/
mongodb_watchdog/ src/ Controller/ OverviewController.php - Obtain the data from the logger.
- RequestController::getRowData in modules/
mongodb_watchdog/ src/ Controller/ RequestController.php - Obtain the data from the logger.
- TopController::getRowData in modules/
mongodb_watchdog/ src/ Controller/ TopController.php - Obtain the data from the logger.
File
- modules/
mongodb_watchdog/ src/ Controller/ ControllerBase.php, line 137
Class
- ControllerBase
- Base controller class for paged reports.
Namespace
Drupal\mongodb_watchdog\ControllerCode
public function setupPager(Request $request, int $count) : int {
$height = $this->itemsPerPage;
$this->pagerManager
->createPager($count, $height);
$requestedPage = intval($request->query
->get('page', 0));
$page = $this
->getPage($count, $requestedPage, $height);
return $page;
}