private function _enviarEmailConfirmacaoInscricao($idPessoa, $idEncontro) { $model = new Application_Model_Participante(); $rs = $model->dadosTicketInscricao($idPessoa, $idEncontro); $pdf = new Sige_Pdf_Relatorio_TicketInscricao($rs); $binary = $pdf->obterPdf(); $mail = new Application_Model_EmailConfirmacao(); $mail->send($idPessoa, $idEncontro, Application_Model_EmailConfirmacao::MSG_CONFIRMACAO_REINSCRICAO, $binary); }
public function ticketAction() { $this->autenticacao(); $this->_helper->layout()->disableLayout(); $this->_helper->viewRenderer->setNoRender(true); $sessao = Zend_Auth::getInstance()->getIdentity(); $cache = Zend_Registry::get('cache_common'); $ps = $cache->load('prefsis'); $id_encontro = (int) $ps->encontro["id_encontro"]; $id_pessoa = $sessao["idPessoa"]; $model = new Application_Model_Participante(); $rs = $model->dadosTicketInscricao($id_pessoa, $id_encontro); $pdf = new Sige_Pdf_Relatorio_TicketInscricao($rs); try { $pdf->gerarPdf(); } catch (Exception $e) { $this->_helper->flashMessenger->addMessage(array('danger' => _('An unexpected error ocurred.<br/> Details: ') . $e->getMessage())); return $this->_helper->redirector->goToRoute(array('controller' => 'participante', 'action' => 'ver'), 'default', true); } }