protected function getTipoBoletim() { $tipo = App_Model_IedFinder::getTurma($codTurma = $this->getRequest()->id); $tipo = $tipo['tipo_boletim']; $tiposBoletim = Portabilis_Model_Report_TipoBoletim; $tipos = array(null => 'indefinido', $tiposBoletim::BIMESTRAL => 'portabilis_boletim', $tiposBoletim::TRIMESTRAL => 'portabilis_boletim_trimestral', $tiposBoletim::TRIMESTRAL_CONCEITUAL => 'portabilis_boletim_primeiro_ano_trimestral', $tiposBoletim::SEMESTRAL => 'portabilis_boletim_semestral', $tiposBoletim::SEMESTRAL_CONCEITUAL => 'portabilis_boletim_conceitual_semestral', $tiposBoletim::SEMESTRAL_EDUCACAO_INFANTIL => 'portabilis_boletim_educ_infantil_semestral', $tiposBoletim::PARECER_DESCRITIVO_COMPONENTE => 'portabilis_boletim_parecer', $tiposBoletim::PARECER_DESCRITIVO_GERAL => 'portabilis_boletim_parecer_geral'); return array('tipo-boletim' => $tipos[$tipo]); }
function templateName() { $flagTipoBoletimTurma = App_Model_IedFinder::getTurma($codTurma = $this->args['turma']); $flagTipoBoletimTurma = $flagTipoBoletimTurma['tipo_boletim']; if (empty($flagTipoBoletimTurma)) { throw new Exception(Portabilis_String_Utils::toLatin1("Não foi definido o tipo de boletim no cadastro de turmas.")); } $tiposBoletim = Portabilis_Model_Report_TipoBoletim; $templates = array($tiposBoletim::BIMESTRAL => 'portabilis_boletim', $tiposBoletim::TRIMESTRAL => 'portabilis_boletim_trimestral', $tiposBoletim::TRIMESTRAL_CONCEITUAL => 'portabilis_boletim_primeiro_ano_trimestral', $tiposBoletim::SEMESTRAL => 'portabilis_boletim_semestral', $tiposBoletim::SEMESTRAL_CONCEITUAL => 'portabilis_boletim_conceitual_semestral', $tiposBoletim::SEMESTRAL_EDUCACAO_INFANTIL => 'portabilis_boletim_educ_infantil_semestral', $tiposBoletim::PARECER_DESCRITIVO_COMPONENTE => 'portabilis_boletim_parecer', $tiposBoletim::PARECER_DESCRITIVO_GERAL => 'portabilis_boletim_parecer_geral'); $template = is_null($flagTipoBoletimTurma) ? '' : $templates[$flagTipoBoletimTurma]; if (empty($template)) { throw new Exception(Portabilis_String_Utils::toLatin1("Não foi possivel recuperar nome do template para o boletim.")); } return $template; }