Пример #1
0
 /**
  * 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 Finances_Model_Receipts();
     $data = $model->fetchEntries();
     //paginator
     if ($data) {
         $paginator = Zend_Paginator::factory($data);
         $finances = Zend_Registry::get('finances');
         $paginator->setItemCountPerPage($finances->paginator);
         $paginator->setCurrentPageNumber($page);
         $paginator->setPageRange($finances->paginator);
         $this->view->paginator = $paginator;
     } else {
         $this->view->paginator = null;
     }
     //send information to the view
     $this->view->title = "Receiptss list";
 }