public function excluirBemDoadoAction() { $this->_helper->layout->disableLayout(); // desabilita o Zend_Layout $post = Zend_Registry::get('post'); $idBensDoados = (int) $post->bensDoados; $doacao = (int) $post->doacao; $aceite = (int) $post->aceite; $where = 'idBensDoados = ' . $idBensDoados; $tbBensDoados = new tbBensDoados(); $exclusaoDoBem = $tbBensDoados->delete($where); $vw = new vwAnexarComprovantes(); $exclusao1 = $vw->excluirArquivo($doacao); $exclusao2 = $vw->excluirArquivo($aceite); if ($exclusaoDoBem) { $this->_helper->viewRenderer->setNoRender(true); $this->_helper->flashMessenger->addMessage('O bem foi excluĂdo com sucesso!'); $this->_helper->flashMessengerType->addMessage('CONFIRM'); echo json_encode(array('resposta' => true)); } else { echo json_encode(array('resposta' => false)); } die; }