Exemplo n.º 1
0
 public function handleErrorEdit()
 {
     $this->event = $this->getEventFromSlug($this->getRequestParameter('slug'));
     $this->regForm = $this->getOrCreateRegForm($this->event->getId());
     $c = new Criteria();
     $c->addAscendingOrderByColumn(RegFieldPeer::ID);
     $this->regFields = RegFieldPeer::doSelect($c);
     $this->forward404Unless($this->event);
     $this->forward404Unless($this->regForm);
     $this->forward404Unless($this->regFields);
     return sfView::SUCCESS;
 }
Exemplo n.º 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(RegFieldPeer::ID, $pks, Criteria::IN);
         $objs = RegFieldPeer::doSelect($criteria, $con);
     }
     return $objs;
 }