Example #1
0
 static function getActivitatsCerca($text, $data, $page = 1, $idS)
 {
     $di = mktime(0, 0, 0, date('m', $data), 1, date('Y', $data));
     $df = mktime(0, 0, 0, date('m', $data) + 1, 1, date('Y', $data));
     $C = HorarisPeer::cercaCriteria(null, $text, $di, $df, null, $idS);
     $C->add(self::TMIG, '', CRITERIA::NOT_EQUAL);
     $C->add(self::PUBLICAWEB, 1);
     $C->addDescendingOrderByColumn(HorarisPeer::DIA);
     $C->addGroupByColumn(self::ACTIVITATID);
     $pager = new sfPropelPager('Activitats', 20);
     $pager->setCriteria($C);
     $pager->setPage($page);
     $pager->init();
     return $pager;
 }