/** * Render grid */ public function render() { $this->model->setLimit($this->paginator->getLength()); $this->model->setOffset($this->paginator->getOffset()); if ($this->sortColumn && $this["columns"]->getComponent($this->sortColumn)->isSortable()) { $this->model->setSorting($this->sortColumn, $this->sortType); } $this['visualPaginator']->setClass(array('paginator', $this->ajaxClass)); $this->template->render(); }
/** * Render grid */ public function render() { $this->paginator->setPage($this->page); $this->model->setLimit($this->paginator->getLength()); $this->model->setOffset($this->paginator->getOffset()); if ($this->sortColumn && $this["columns"]->getComponent($this->sortColumn)->isSortable()) { $this->model->setSorting($this->sortColumn, $this->sortType); } $this->template->render(); }
/** * Set page * @param int $page */ private function setPage($page) { $paginator = $this->getPaginator(); $paginator->setPage($page); $this->model->setLimit($paginator->getOffset(), $paginator->getLength()); }