Beispiel #1
0
 /**
  * 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 Client (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->setUserId($this->user_id);
     $copyObj->setName($this->name);
     $copyObj->setDepartment($this->department);
     $copyObj->setAddress($this->address);
     $copyObj->setEmail($this->email);
     $copyObj->setPhone($this->phone);
     $copyObj->setSlug($this->slug);
     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->getJobClients() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addJobClient($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a auto-increment column, so set to default value
 }
Beispiel #2
0
 /**
  * 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 Job (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->setProjectId($this->project_id);
     $copyObj->setPublicationId($this->publication_id);
     $copyObj->setStatusId($this->status_id);
     $copyObj->setEvent($this->event);
     $copyObj->setDate($this->date);
     $copyObj->setStartTime($this->start_time);
     $copyObj->setEndTime($this->end_time);
     $copyObj->setDueDate($this->due_date);
     $copyObj->setCreatedAt($this->created_at);
     $copyObj->setStreet($this->street);
     $copyObj->setCity($this->city);
     $copyObj->setState($this->state);
     $copyObj->setZip($this->zip);
     $copyObj->setContactName($this->contact_name);
     $copyObj->setContactEmail($this->contact_email);
     $copyObj->setContactPhone($this->contact_phone);
     $copyObj->setNotes($this->notes);
     $copyObj->setEstimate($this->estimate);
     $copyObj->setAcctNum($this->acct_num);
     $copyObj->setDeptId($this->dept_id);
     $copyObj->setGrantId($this->grant_id);
     $copyObj->setOther($this->other);
     $copyObj->setQues1($this->ques1);
     $copyObj->setQues2($this->ques2);
     $copyObj->setQues3($this->ques3);
     $copyObj->setSlug($this->slug);
     $copyObj->setPhotoType($this->photo_type);
     $copyObj->setProcessing($this->processing);
     $copyObj->setGCalId($this->g_cal_id);
     $copyObj->setGCalIdCustom($this->g_cal_id_custom);
     $copyObj->setGCalIdCustomUrl($this->g_cal_id_custom_url);
     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->getJobAttachments() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addJobAttachment($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getPhotos() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addPhoto($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getDeliverys() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addDelivery($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getJobPhotographers() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addJobPhotographer($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getJobClients() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addJobClient($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a auto-increment column, so set to default value
 }