/** * @Post("/paginator") */ public function paginatorAction() { $pagination = $this->persistent->pagination; // Set current page if ($this->request->hasPost('page')) { $pagination['page'] = (int) $this->request->getPost('page', 'int'); } // Set items per page if ($this->request->hasPost('limit')) { $pagination['limit'] = (int) $this->request->getPost('limit', 'int'); $pagination['page'] = 1; } $this->persistent->pagination = $pagination; parent::redirectBack(); }