public function executeDeletePerson() { $person = EventPeoplePeer::retrieveByPk($this->getRequestParameter('id')); $this->forward404Unless($person); $this->event = $person->getEvent(); $this->type = strtolower($person->getPersonType()); $person->delete(); }
public function getEventPeoplesJoinEvent($criteria = null, $con = null) { include_once 'lib/model/om/BaseEventPeoplePeer.php'; if ($criteria === null) { $criteria = new Criteria(); } elseif ($criteria instanceof Criteria) { $criteria = clone $criteria; } if ($this->collEventPeoples === null) { if ($this->isNew()) { $this->collEventPeoples = array(); } else { $criteria->add(EventPeoplePeer::PERSON_TYPE_ID, $this->getId()); $this->collEventPeoples = EventPeoplePeer::doSelectJoinEvent($criteria, $con); } } else { $criteria->add(EventPeoplePeer::PERSON_TYPE_ID, $this->getId()); if (!isset($this->lastEventPeopleCriteria) || !$this->lastEventPeopleCriteria->equals($criteria)) { $this->collEventPeoples = EventPeoplePeer::doSelectJoinEvent($criteria, $con); } } $this->lastEventPeopleCriteria = $criteria; return $this->collEventPeoples; }
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(EventPeoplePeer::ID, $pks, Criteria::IN); $objs = EventPeoplePeer::doSelect($criteria, $con); } return $objs; }
public function fromArray($arr, $keyType = BasePeer::TYPE_PHPNAME) { $keys = EventPeoplePeer::getFieldNames($keyType); if (array_key_exists($keys[0], $arr)) { $this->setId($arr[$keys[0]]); } if (array_key_exists($keys[1], $arr)) { $this->setEventId($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]]); } }