Example #1
0
 public function executeDeletePerson()
 {
     $person = EtimePeoplePeer::retrieveByPk($this->getRequestParameter('id'));
     $this->forward404Unless($person);
     $this->etime = $person->getEtime();
     $this->type = strtolower($person->getPersonType());
     $person->delete();
 }
Example #2
0
 public function getEtimePeoplesJoinEtime($criteria = null, $con = null)
 {
     include_once 'lib/model/om/BaseEtimePeoplePeer.php';
     if ($criteria === null) {
         $criteria = new Criteria();
     } elseif ($criteria instanceof Criteria) {
         $criteria = clone $criteria;
     }
     if ($this->collEtimePeoples === null) {
         if ($this->isNew()) {
             $this->collEtimePeoples = array();
         } else {
             $criteria->add(EtimePeoplePeer::PERSON_TYPE_ID, $this->getId());
             $this->collEtimePeoples = EtimePeoplePeer::doSelectJoinEtime($criteria, $con);
         }
     } else {
         $criteria->add(EtimePeoplePeer::PERSON_TYPE_ID, $this->getId());
         if (!isset($this->lastEtimePeopleCriteria) || !$this->lastEtimePeopleCriteria->equals($criteria)) {
             $this->collEtimePeoples = EtimePeoplePeer::doSelectJoinEtime($criteria, $con);
         }
     }
     $this->lastEtimePeopleCriteria = $criteria;
     return $this->collEtimePeoples;
 }
Example #3
0
 public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME)
 {
     $keys = EtimePeoplePeer::getFieldNames($keyType);
     if (array_key_exists($keys[0], $arr)) {
         $this->setId($arr[$keys[0]]);
     }
     if (array_key_exists($keys[1], $arr)) {
         $this->setEtimeId($arr[$keys[1]]);
     }
     if (array_key_exists($keys[2], $arr)) {
         $this->setName($arr[$keys[2]]);
     }
     if (array_key_exists($keys[3], $arr)) {
         $this->setEmail($arr[$keys[3]]);
     }
     if (array_key_exists($keys[4], $arr)) {
         $this->setPhone($arr[$keys[4]]);
     }
     if (array_key_exists($keys[5], $arr)) {
         $this->setPersonTypeId($arr[$keys[5]]);
     }
 }
Example #4
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(EtimePeoplePeer::ID, $pks, Criteria::IN);
         $objs = EtimePeoplePeer::doSelect($criteria, $con);
     }
     return $objs;
 }