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 sfGuardUser (or compatible) type.
  * @param      boolean $deepCopy Whether to also copy all rows that refer (by fkey) to the current row.
  * @param      boolean $makeNew Whether to reset autoincrement PKs and make the object new.
  * @throws     PropelException
  */
 public function copyInto($copyObj, $deepCopy = false, $makeNew = true)
 {
     $copyObj->setUsername($this->getUsername());
     $copyObj->setAlgorithm($this->getAlgorithm());
     $copyObj->setSalt($this->getSalt());
     $copyObj->setPassword($this->getPassword());
     $copyObj->setCreatedAt($this->getCreatedAt());
     $copyObj->setLastLogin($this->getLastLogin());
     $copyObj->setIsActive($this->getIsActive());
     $copyObj->setIsSuperAdmin($this->getIsSuperAdmin());
     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->getBranchs() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addBranch($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getCommentsRelatedByUserId() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addCommentRelatedByUserId($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getCommentsRelatedByCheckUserId() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addCommentRelatedByCheckUserId($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getFiles() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addFile($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getProfiles() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addProfile($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getStatusActions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addStatusAction($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getsfGuardUserPermissions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addsfGuardUserPermission($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getsfGuardUserGroups() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addsfGuardUserGroup($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getsfGuardRememberKeys() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addsfGuardRememberKey($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     if ($makeNew) {
         $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 Agent (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->setCreatedAt($this->created_at);
     $copyObj->setLastUpdated($this->last_updated);
     $copyObj->setDeletedAt($this->deleted_at);
     $copyObj->setOrgEmail($this->org_email);
     $copyObj->setOrgName($this->org_name);
     $copyObj->setIndAffiliation($this->ind_affiliation);
     $copyObj->setIndRole($this->ind_role);
     $copyObj->setAddress1($this->address1);
     $copyObj->setAddress2($this->address2);
     $copyObj->setCity($this->city);
     $copyObj->setState($this->state);
     $copyObj->setPostalCode($this->postal_code);
     $copyObj->setCountry($this->country);
     $copyObj->setPhone($this->phone);
     $copyObj->setWebAddress($this->web_address);
     $copyObj->setType($this->type);
     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->getProfiles() as $relObj) {
             $copyObj->addProfile($relObj->copy($deepCopy));
         }
         foreach ($this->getAgentHasUsers() as $relObj) {
             $copyObj->addAgentHasUser($relObj->copy($deepCopy));
         }
         foreach ($this->getSchemas() as $relObj) {
             $copyObj->addSchema($relObj->copy($deepCopy));
         }
         foreach ($this->getVocabularys() as $relObj) {
             $copyObj->addVocabulary($relObj->copy($deepCopy));
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a pkey 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 Status (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->setDisplayOrder($this->display_order);
     $copyObj->setDisplayName($this->display_name);
     $copyObj->setUri($this->uri);
     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->getProfiles() as $relObj) {
             $copyObj->addProfile($relObj->copy($deepCopy));
         }
         foreach ($this->getProfilePropertys() as $relObj) {
             $copyObj->addProfileProperty($relObj->copy($deepCopy));
         }
         foreach ($this->getCollections() as $relObj) {
             $copyObj->addCollection($relObj->copy($deepCopy));
         }
         foreach ($this->getConcepts() as $relObj) {
             $copyObj->addConcept($relObj->copy($deepCopy));
         }
         foreach ($this->getConceptPropertys() as $relObj) {
             $copyObj->addConceptProperty($relObj->copy($deepCopy));
         }
         foreach ($this->getConceptPropertyHistorys() as $relObj) {
             $copyObj->addConceptPropertyHistory($relObj->copy($deepCopy));
         }
         foreach ($this->getSchemas() as $relObj) {
             $copyObj->addSchema($relObj->copy($deepCopy));
         }
         foreach ($this->getSchemaPropertys() as $relObj) {
             $copyObj->addSchemaProperty($relObj->copy($deepCopy));
         }
         foreach ($this->getSchemaPropertyElements() as $relObj) {
             $copyObj->addSchemaPropertyElement($relObj->copy($deepCopy));
         }
         foreach ($this->getSchemaPropertyElementHistorys() as $relObj) {
             $copyObj->addSchemaPropertyElementHistory($relObj->copy($deepCopy));
         }
         foreach ($this->getVocabularys() as $relObj) {
             $copyObj->addVocabulary($relObj->copy($deepCopy));
         }
     }
     // if ($deepCopy)
     $copyObj->setNew(true);
     $copyObj->setId(NULL);
     // this is a pkey column, so set to default value
 }