/** * Creates query to paginate rows */ private function paginateQuery() { $limit = $this->conf->getViewLimit(); $page = $this->http->router->get('page', 1); $offset = $limit * ($page - 1); $query = $this->query->getQuery()->setFirstResult($offset)->setMaxResults($limit)->getResult(); $this->entityArray = $query; }
private function setParams() { $this->limit = $this->conf->getViewLimit(); $this->countPage = $this->getSitesNumber(); }
/** * * @return integer */ public function getViewLimit() : int { return $this->conf->getViewLimit(); }