Exemple #1
0
 public static function website_search(&$c, &$pager)
 {
     self::getSearchParams($context, $user, $request, $keys, $stype);
     $pager = "Page";
     $c->add(PagePeer::LABEL, $keys, Criteria::LIKE);
     $res = PagePeer::doSelect($c);
     $c = new Criteria();
     $c->add(PageI18nPeer::LABEL, $keys, Criteria::LIKE);
     $res2 = PageI18nPeer::doSelect($c);
     $c = new Criteria();
     $c->add(TopicPeer::LABEL, $keys, Criteria::LIKE);
     $res3 = TopicPeer::doSelect($c);
     $c = new Criteria();
     $c->add(TopicI18nPeer::LABEL, $keys, Criteria::LIKE);
     $res4 = TopicI18nPeer::doSelect($c);
     $c = array_merge($res, array_merge($res2, array_merge($res3, $res4)));
 }
Exemple #2
0
 public static function retrieveByPKs($pks, $con = null)
 {
     if ($con === null) {
         $con = Propel::getConnection(self::DATABASE_NAME);
     }
     $objs = null;
     if (empty($pks)) {
         $objs = array();
     } else {
         $criteria = new Criteria();
         $criteria->add(TopicPeer::ID, $pks, Criteria::IN);
         $objs = TopicPeer::doSelect($criteria, $con);
     }
     return $objs;
 }