private function CarregaInfoCursos($idS, $cat = 0) { $RET = array(); $A_OC_PAGER = CursosPeer::getCursos(CursosPeer::CURSACTIU, 0, '', $idS, true); foreach ($A_OC_PAGER->getResults() as $OC) { if (!isset($RET[$OC->getCategoria()])) { $OT = TipusPeer::retrieveByPK($OC->getCategoria()); if ($OT instanceof Tipus) { $RET[$OC->getCategoria()] = array('mode' => 3, 'titol' => $OT->getTipusdesc(), 'elements' => array()); } else { $RET[$OC->getCategoria()] = array('mode' => 3, 'titol' => 'n/d', 'elements' => array()); } } $RET[$OC->getCategoria()]['elements'][$OC->getIdcursos()] = array('url' => '@web_menu_click_curs?idCategoria=' . $OC->getCategoria() . '&idCurs=' . $OC->getIdcursos() . '&titol=' . $OC->getNomForUrl(), 'titol' => ' <div style="float:left; width: 400px;"><span style="font-size:8px; color:black;"> ' . $OC->getCodi() . ' </span><br />' . $OC->getTitolcurs() . '</div><div style="float:left;">' . $OC->getHoraris() . '<br /><span style="font-size:9px; color:gray;">Inici: ' . $OC->getDatainici('d-m-Y') . '</div><div style="clear:both"></div>', 'img' => 'color'); } return $RET; }
public function h_getDescomptes() { $RET = array(); foreach (explode('@', $this->getAdescomptes()) as $DESC) { $OT = TipusPeer::retrieveByPK($DESC); if ($OT instanceof Tipus) { $RET[$DESC] = $OT->getTipusdesc(); } } return $RET; }