/** * IndexAction for Permissions * * @return void */ function indexAction() { //get the page of the table $page = $this->_getParam('page', 1); //get the dates for the table $model = new Supplier_Model_Companiessupplier(); $data = $model->fetchEntries(); //paginator if ($data) { $paginator = Zend_Paginator::factory($data); $supplier = Zend_Registry::get('supplier'); $paginator->setItemCountPerPage($supplier->paginator); $paginator->setCurrentPageNumber($page); $paginator->setPageRange($supplier->paginator); $this->view->paginator = $paginator; } else { $this->view->paginator = null; } //send information to the view $this->view->title = "Companies suppliers list"; }