Exemplo n.º 1
0
 public function categoryAction()
 {
     $session = new Zend_Session_Namespace('Zend_auth');
     $user = $session->user;
     $modelCategory = new Application_Model_Category();
     $this->view->categories = $modelCategory->getAll();
     $modelTransaction = new Application_Model_Transaction();
     $category = $this->getRequest()->getPost('category', null);
     if ($category != null) {
         $transactions = $modelTransaction->getByCategory($category, $user);
         $this->view->transactions = $transactions;
         $this->view->category = $category;
     }
 }