/**
  * check if the user is indirectly monitoring the act
  * indirect monitoring means the user is monitoring a tag associated to the act
  *
  * @return void
  * @author Guglielmo Celata
  **/
 public function isIndirectlyMonitoringAct($act_id)
 {
     $user_monitored_tags_pks = $this->getMonitoredPks('Tag');
     $c = new Criteria();
     $c->addJoin(OppAttoPeer::ID, TaggingPeer::TAGGABLE_ID);
     $c->add(TaggingPeer::TAG_ID, $user_monitored_tags_pks, Criteria::IN);
     $c->add(OppAttoPeer::ID, $act_id);
     $count = OppAttoPeer::doCount($c);
     return $count > 0 ? true : false;
 }
 public function executeGetNumeroAtti()
 {
     $c = new Criteria();
     $number = OppAttoPeer::doCount($c);
     $resp_node = new SimpleXMLElement('<openparlamento_response></openparlamento_response>');
     $number_node = $resp_node->addChild('numero_atti', $number);
     $this->xmlContent = $resp_node->asXML();
     $this->response->setContentType('text/xml; charset=utf-8');
     $this->response->setHttpHeader('Content-Length: ', strlen($this->xmlContent));
     $this->setLayout(false);
 }