public function itemAction() { $form = new Form_Iadmin_Products(); $items = new Model_Items(); if ($this->_request->isPost()) { if ($form->isValid($this->_request->getPost())) { $item_description = $form->getValue('item_description'); if (!empty($item_description)) { $items->form_values['item_description'] = $item_description; } } $form->item_description->setValue($item_description); } $sort = $this->_getParam("sort", "asc"); $order = $this->_getParam("order", "stakeholder"); $result = $items->getAllItems(); //Paginate the contest results $paginator = Zend_Paginator::factory($result); $page = $this->_getParam("page", 1); $counter = $this->_getParam("counter", 10); $paginator->setCurrentPageNumber((int) $page); $paginator->setItemCountPerPage((int) $counter); $this->view->form = $form; $this->view->paginator = $paginator; $this->view->sort = $sort; $this->view->order = $order; $this->view->counter = $counter; }