public function adicionarAction() { require_once APPLICATION_PATH . '/modules/admin/forms/Categoria.php'; $this->view->form = new admin_Form_Categoria(); $categoriaModel = new Application_Model_Categoria(); if ($this->_request->isPost()) { $this->view->form->setDefaults($this->_request->getPost()); $data = $this->view->form->getValues(); if ($this->view->form->isValid($data)) { $id = $categoriaModel->insert($data); return $this->_helper->redirector('index'); } } }