public static function generateIDH_componente($block_componente) { if (TextBuilder_EN::$print) { $block_componente->setData("quebra", "<div style='page-break-after: always'></div>"); } else { $block_componente->setData("quebra", ""); } $block_componente->setData("fonte", TextBuilder_EN::$fontePerfil); $block_componente->setTi("titulo", "MHDI"); //@Translate $block_componente->setData("subtitulo", "Components"); //@Translate $block_componente->setData("canvasContent", getChartDesenvolvimentoHumano(TextBuilder_EN::$idMunicipio, TextBuilder_EN::$lang)); $block_componente->setData("info", ""); $idhm = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "IDHM"); //IDHM $idhm_r = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "IDHM_R"); //IDHM_R $idhm_l = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "IDHM_L"); //IDHM_L $idhm_e = TextBuilder_EN::getVariaveis_table(TextBuilder_EN::$idMunicipio, "IDHM_E"); //IDHM_E //@Translate $str = "The Municipal Human Development Index (MHDI) of [municipio] is [idh] in [2010].\n The municipality is located in category [Faixa_DH] Human Development. \n Between 2000 and 2010, the dimension that grew the most in absolute terms was [Dimensao2000a2010]. \n Between 1991 and 2000, the dimension that grew the most in absolute terms was [Dimensao1991a2000].\n "; $texto = new Texto($str); $texto->replaceTags("2010", Formulas::getLabelAno2010($idhm)); $texto->replaceTags("municipio", TextBuilder_EN::$nomeMunicipio); $texto->replaceTags("idh", Formulas::getIDH2010($idhm)); $texto->replaceTags("Faixa_DH", Formulas::getSituacaoIDH($idhm, TextBuilder_EN::$lang)); $texto->replaceTags("Dimensao2000a2010", Formulas::getDimensao(TextBuilder_EN::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => true, "faixa9100" => false))); $texto->replaceTags("Dimensao1991a2000", Formulas::getDimensao(TextBuilder_EN::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => false, "faixa9100" => true))); $block_componente->setData("text", $texto->getTexto()); }
public static function generateIDH_componente($block_componente) { if (TextBuilder_ES::$print) { $block_componente->setData("quebra", "<div style='page-break-after: always'></div>"); } else { $block_componente->setData("quebra", ""); } $block_componente->setData("fonte", TextBuilder_ES::$fontePerfil); $block_componente->setData("titulo", "IDHM"); //@Translate $block_componente->setData("subtitulo", "Componentes"); //@Translate $block_componente->setData("canvasContent", getChartDesenvolvimentoHumano(TextBuilder_ES::$idMunicipio, TextBuilder_ES::$lang)); $block_componente->setData("info", ""); $idhm = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "IDHM"); //IDHM $idhm_r = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "IDHM_R"); //IDHM_R $idhm_l = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "IDHM_L"); //IDHM_L $idhm_e = TextBuilder_ES::getVariaveis_table(TextBuilder_ES::$idMunicipio, "IDHM_E"); //IDHM_E //@Translate $str = "El Índice de Desarrollo Humano Municipal (IDHM) de [municipio] es de [idh] para [2010].\n El municipio tiene un nivel de desarrollo humano [Faixa_DH]. \n Entre el 2000 y 2010, el factor que más se incrementó en términos absolutos fue [Dimensao2000a2010]. \n Entre 1991 y el 2000, el factor que más se incrementó en términos absolutos fue [Dimensao1991a2000].\n "; $texto = new Texto($str); $texto->replaceTags("2010", Formulas::getLabelAno2010($idhm)); $texto->replaceTags("municipio", TextBuilder_ES::$nomeMunicipio); $texto->replaceTags("idh", Formulas::getIDH2010($idhm)); $texto->replaceTags("Faixa_DH", Formulas::getSituacaoIDH($idhm, TextBuilder_ES::$lang)); $texto->replaceTags("Dimensao2000a2010", Formulas::getDimensao(TextBuilder_ES::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => true, "faixa9100" => false))); $texto->replaceTags("Dimensao1991a2000", Formulas::getDimensao(TextBuilder_ES::$lang, $idhm_r, $idhm_l, $idhm_e, array("faixa0010" => false, "faixa9100" => true))); $block_componente->setData("text", $texto->getTexto()); }