{
if ($this->getNormalizeOutOfRangePages()) {
return $this->getNbPages();
}
throw new OutOfRangeCurrentPageException(sprintf('Page "%d" does not exist. The currentPage must be inferior to "%d"', $currentPage, $this->getNbPages()));
}
private function resetForCurrentPageChange(): void
{
$this->currentPageResults = null;
protected function listAction()
{
$this->dispatch(EasyAdminEvents::PRE_LIST);
$fields = $this->entity['list']['fields'];
$paginator = $this->findAll($this->entity['class'], $this->request->query->get('page', 1), $this->entity['list']['max_results'], $this->request->query->get('sortField'), $this->request->query->get('sortDirection'), $this->entity['list']['dql_filter']);
$this->dispatch(EasyAdminEvents::POST_LIST, ['paginator' => $paginator]);
$parameters = [
'paginator' => $paginator,
if (false === $userHasPermission) {
throw new NoPermissionException(['action' => $action, 'entity_name' => $this->entity['name'], 'entity_id' => $id]);
}
}
return $this->executeDynamicMethod($action.'<EntityName>Action');
}
/**
* Utility method which initializes the configuration of the entity on which
* the user is performing the action.
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, int $type = HttpKernelInterface::MASTER_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
No log messages
OutOfRangeCurrentPageException |
---|
Pagerfanta\Exception\OutOfRangeCurrentPageException: Page "2" does not exist. The currentPage must be inferior to "1" at vendor/pagerfanta/pagerfanta/lib/Core/Pagerfanta.php:292 at Pagerfanta\Pagerfanta->normalizeOutOfRangeCurrentPage() (vendor/pagerfanta/pagerfanta/lib/Core/Pagerfanta.php:265) at Pagerfanta\Pagerfanta->filterOutOfRangeCurrentPage() (vendor/pagerfanta/pagerfanta/lib/Core/Pagerfanta.php:237) at Pagerfanta\Pagerfanta->filterCurrentPage() (vendor/pagerfanta/pagerfanta/lib/Core/Pagerfanta.php:191) at Pagerfanta\Pagerfanta->setCurrentPage() (vendor/easycorp/easyadmin-bundle/src/Search/Paginator.php:41) at EasyCorp\Bundle\EasyAdminBundle\Search\Paginator->createOrmPaginator() (vendor/easycorp/easyadmin-bundle/src/Controller/AdminControllerTrait.php:690) at EasyCorp\Bundle\EasyAdminBundle\Controller\EasyAdminController->findAll() (vendor/easycorp/easyadmin-bundle/src/Controller/AdminControllerTrait.php:182) at EasyCorp\Bundle\EasyAdminBundle\Controller\EasyAdminController->listAction() (vendor/easycorp/easyadmin-bundle/src/Controller/AdminControllerTrait.php:912) at EasyCorp\Bundle\EasyAdminBundle\Controller\EasyAdminController->executeDynamicMethod() (vendor/easycorp/easyadmin-bundle/src/Controller/AdminControllerTrait.php:86) at EasyCorp\Bundle\EasyAdminBundle\Controller\EasyAdminController->indexAction() (vendor/symfony/http-kernel/HttpKernel.php:157) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:79) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:195) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:24) |