public function getTitolo()
 {
     if ($this->getTitoloAggiuntivo() && $this->getTitoloAggiuntivo() != '') {
         return "[" . $this->getTitoloAggiuntivo() . "] " . parent::getTitolo();
     } else {
         $c = new Criteria();
         $c->add(OppVotazioneHasAttoPeer::VOTAZIONE_ID, $this->getId());
         $r = OppVotazioneHasAttoPeer::doSelectOne($c);
         if ($r) {
             if ($r->getOppAtto()->getTitoloAggiuntivo() && $r->getOppAtto()->getTitoloAggiuntivo() != '') {
                 return $r->getOppAtto()->getTitoloAggiuntivo() . " - <strong>" . parent::getTitolo() . "</strong>";
             } else {
                 return $r->getOppAtto()->getTitolo() . " - <strong>" . parent::getTitolo() . "</strong>";
             }
         } else {
             return parent::getTitolo();
         }
     }
 }
 /**
  * Executes index action
  *
  */
 public function executeIndex()
 {
     $votazione_id = $this->getRequestParameter('id');
     $this->votazione = OppVotazionePeer::retrieveByPK($votazione_id);
     $this->forward404Unless($this->votazione);
     $this->ramo = $this->votazione->getOppSeduta()->getRamo() == 'C' ? 'Camera' : 'Senato';
     $data = $this->votazione->getOppSeduta()->getData('Y-m-d');
     $this->risultati = $this->votazione->getVotoGruppi($data);
     $this->ribelli = $this->votazione->getVotoRibelli($data);
     $this->getResponse()->setTitle('Votazione ' . $this->ramo . ' ' . $this->votazione->getTitolo() . ' - ' . sfConfig::get('app_main_title'));
     $this->response->addMeta('description', 'Come hanno votato i gruppi, che voto hanno espresso i singoli parlamentari e quali sono stati ribelli al proprio gruppo parlamentare per la votazione ' . $this->ramo . ' ' . $this->votazione->getTitolo(), true);
     $this->processSort();
     $this->votanti = OppVotazioneHasCaricaPeer::getRSAllVotanti($votazione_id, $data);
     $this->votantiComponent = OppVotazioneHasCaricaPeer::getRSAllVotanti($votazione_id, $data);
     $c = new Criteria();
     $c->add(OppVotazioneHasGruppoPeer::VOTAZIONE_ID, $votazione_id);
     $this->voto_gruppi = OppVotazioneHasGruppoPeer::doSelect($c);
     $c = new Criteria();
     $c->add(OppVotazioneHasAttoPeer::VOTAZIONE_ID, $votazione_id);
     $this->voto_atti = OppVotazioneHasAttoPeer::doSelect($c);
     $c = new Criteria();
     $c->add(OppVotazioneHasEmendamentoPeer::VOTAZIONE_ID, $votazione_id);
     $this->voto_ems = OppVotazioneHasEmendamentoPeer::doSelect($c);
 }
 public function getIdVotazioni()
 {
     $ids = array();
     $c = new Criteria();
     $c->clearSelectColumns();
     $c->addSelectColumn(OppVotazioneHasAttoPeer::VOTAZIONE_ID);
     $c->add(OppVotazioneHasAttoPeer::ATTO_ID, $this->getId(), Criteria::EQUAL);
     $rs = OppVotazioneHasAttoPeer::doSelectRS($c);
     while ($rs->next()) {
         array_push($ids, $rs->getInt(1));
     }
     return $ids;
 }