public function preExecute()
 {
     if (sfConfig::get('app_sfSimpleBlog_use_bundled_layout', true)) {
         $this->setLayout(sfLoader::getTemplateDir('sfSimpleBlog', 'layout.php') . '/layout');
         $this->getResponse()->addStylesheet('/sfSimpleBlogPlugin/css/blog.css');
     }
     deppFiltersAndSortVariablesManager::resetVars($this->getUser(), 'module', 'module', array('acts_filter', 'sf_admin/opp_atto/sort', 'votes_filter', 'sf_admin/opp_votazione/sort', 'pol_camera_filter', 'pol_senato_filter', 'sf_admin/opp_carica/sort', 'argomento/atti_filter', 'argomento_leggi/sort', 'argomento_nonleg/sort'));
 }
 public function executeIndex()
 {
     $this->getResponse()->setTitle('Monitora i tuoi rappresentanti - ' . sfConfig::get('app_main_title'));
     $this->getResponse()->addMeta('description', 'Cosa fanno i tuoi rappresentanti? Tutte le attività parlamentari aggiornate quotidianamente.', true);
     deppFiltersAndSortVariablesManager::resetVars($this->getUser(), 'module', 'module', array('acts_filter', 'sf_admin/opp_atto/sort', 'votes_filter', 'sf_admin/opp_votazione/sort', 'pol_camera_filter', 'pol_senato_filter', 'sf_admin/opp_carica/sort', 'argomento/atti_filter', 'argomento_leggi/sort', 'argomento_nonleg/sort', 'monitoring_filter'));
     // ultime attivita' della community
     $this->latest_activities = CommunityNewsPeer::getLatestActivities(4);
     // ultime news dal parlamento
     $c = oppNewsPeer::getHomeNewsCriteria();
     $c->addDescendingOrderByColumn(NewsPeer::DATE);
     $itemsperpage = 4;
     $pager = new deppNewsPager('News', $itemsperpage);
     $pager->setCriteria($c);
     $pager->setPage($this->getRequestParameter('page', 1));
     $pager->init();
     $this->pager = $pager;
     // atti in evidenza
     $this->lanci = array();
     $c = new Criteria();
     $c->add(sfLaunchingPeer::LAUNCH_NAMESPACE, 'home');
     $c->add(sfLaunchingPeer::OBJECT_MODEL, 'OppAtto');
     $c->setLimit(8);
     $c->addDescendingOrderByColumn(sfLaunchingPeer::PRIORITY);
     $evidences = sfLaunchingPeer::doSelect($c);
     foreach ($evidences as $evidence) {
         $atto = OppAttoPeer::retrieveByPk($evidence->getObjectId());
         $this->lanci[] = $atto->getId();
     }
     // post del blog
     $this->post_pager = sfSimpleBlogPostPeer::getTaggedPager('in evidenza', sfConfig::get('app_sfSimpleBlog_post_max_per_page', 10), $this->getRequestParameter('page', 1));
     // estrae le circoscrizioni, compreso il valore 0
     $this->senato_constituencies = OppCaricaPeer::getAllConstituencies('senato', false);
     $this->camera_constituencies = OppCaricaPeer::getAllConstituencies('camera', false);
 }
 /**
  * reset filters and sort session variables when
  * the action changes
  *
  * @return void
  * @author Guglielmo Celata
  */
 protected function _reset_session_vars()
 {
     deppFiltersAndSortVariablesManager::resetVars($this->getUser(), 'action', 'acts_action', array('acts_filter', 'sf_admin/opp_atto/sort'));
 }
 public function preExecute()
 {
     deppFiltersAndSortVariablesManager::resetVars($this->getUser(), 'module', 'module', array('acts_filter', 'sf_admin/opp_atto/sort', 'votes_filter', 'sf_admin/opp_votazione/sort', 'pol_camera_filter', 'pol_senato_filter', 'sf_admin/opp_carica/sort', 'argomento/atti_filter', 'argomento_leggi/sort', 'argomento_nonleg/sort'));
 }
 /**
  * reset filters and sort session variables when
  * the action changes
  *
  * @return void
  * @author Guglielmo Celata
  */
 protected function _reset_session_vars()
 {
     deppFiltersAndSortVariablesManager::resetVars($this->getUser(), 'action', 'emendaments_action', array('emendaments_filter'));
 }