public function executeDelete() { $careerresources = CareerresourcesPeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($careerresources); $careerresources->delete(); return $this->redirect('careerresources/list'); }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = CareerresourcesPeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setName($arr[$keys[1]]); } }
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(CareerresourcesPeer::ID, $pks, Criteria::IN); $objs = CareerresourcesPeer::doSelect($criteria, $con); } return $objs; }