/** * Sets contents of passed object to values from current object. * * If desired, this method can also make copies of all associated (fkey referrers) * objects. * * @param object $copyObj An object of Event (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false) { $copyObj->setEventName($this->event_name); $copyObj->setEventDate($this->event_date); $copyObj->setEventTime($this->event_time); $copyObj->setLocation($this->location); $copyObj->setShortDesc($this->short_desc); $copyObj->setLongDesc($this->long_desc); $copyObj->setContactInfo($this->contact_info); $copyObj->setEmailSentDate($this->email_sent_date); $copyObj->setOnlineReservation($this->online_reservation); $copyObj->setAdultCost($this->adult_cost); $copyObj->setChildCost($this->child_cost); $copyObj->setAdultDoorCost($this->adult_door_cost); $copyObj->setChildDoorCost($this->child_door_cost); $copyObj->setSignupDeadline($this->signup_deadline); $copyObj->setOnsiteSignupOk($this->onsite_signup_ok); $copyObj->setMaxPersons($this->max_persons); $copyObj->setCollectSecureInfo($this->collect_secure_info); $copyObj->setAddlInfoFields($this->addl_info_fields); $copyObj->setAddlInfoFieldsHelp($this->addl_info_fields_help); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); foreach ($this->getEventReservations() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addEventReservation($relObj->copy($deepCopy)); } } foreach ($this->getEventWingss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addEventWings($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value }
/** * Sets contents of passed object to values from current object. * * If desired, this method can also make copies of all associated (fkey referrers) * objects. * * @param object $copyObj An object of Wing (or compatible) type. * @param boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row. * @throws PropelException */ public function copyInto($copyObj, $deepCopy = false) { $copyObj->setName($this->name); $copyObj->setNewsletterAbbreviation($this->newsletter_abbreviation); $copyObj->setDisplayName($this->display_name); $copyObj->setState($this->state); if ($deepCopy) { // important: temporarily setNew(false) because this affects the behavior of // the getter/setter methods for fkey referrer objects. $copyObj->setNew(false); foreach ($this->getAirports() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addAirport($relObj->copy($deepCopy)); } } foreach ($this->getEmailLists() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addEmailList($relObj->copy($deepCopy)); } } foreach ($this->getEventWingss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addEventWings($relObj->copy($deepCopy)); } } foreach ($this->getMembers() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addMember($relObj->copy($deepCopy)); } } foreach ($this->getMemberWingStatss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addMemberWingStats($relObj->copy($deepCopy)); } } foreach ($this->getMissionTypeWingStatss() as $relObj) { if ($relObj !== $this) { // ensure that we don't try to copy a reference to ourselves $copyObj->addMissionTypeWingStats($relObj->copy($deepCopy)); } } } // if ($deepCopy) $copyObj->setNew(true); $copyObj->setId(NULL); // this is a auto-increment column, so set to default value }