public function indexAction($categoryID = 0) { $this->setTitle("Список элементов"); $this->setCategoryTitleSmall($categoryID); $this->view->addUrl = $this->di->get('url')->get(array( 'for' => 'new_element', 'categoryID' => $categoryID )); $elements = Elements::find([ "categoryID = :categoryID:", "bind" => ["categoryID" => $categoryID], "bindTypes" => ["categoryID" => Column::BIND_PARAM_INT], "order" => "created desc" ]); // ПАГИНАЦИЯ ??? $paginator = new Paginator(array( "data" => $elements, "limit" => 10, "page" => $this->request->getQuery("page", "int") ?: 1 )); $this->view->page = $paginator->getPaginate(); $this->view->elements = $elements; }