Example #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 \App\Propel\ProductVariation (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->setProductVariationTypeId($this->getProductVariationTypeId());
     $copyObj->setVariationId($this->getVariationId());
     $copyObj->setCreatedAt($this->getCreatedAt());
     $copyObj->setUpdatedAt($this->getUpdatedAt());
     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->getOrderProducts() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addOrderProduct($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setProductVariationId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }
Example #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 \Thelia\Model\Order (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->setRef($this->getRef());
     $copyObj->setCustomerId($this->getCustomerId());
     $copyObj->setInvoiceOrderAddressId($this->getInvoiceOrderAddressId());
     $copyObj->setDeliveryOrderAddressId($this->getDeliveryOrderAddressId());
     $copyObj->setInvoiceDate($this->getInvoiceDate());
     $copyObj->setCurrencyId($this->getCurrencyId());
     $copyObj->setCurrencyRate($this->getCurrencyRate());
     $copyObj->setTransactionRef($this->getTransactionRef());
     $copyObj->setDeliveryRef($this->getDeliveryRef());
     $copyObj->setInvoiceRef($this->getInvoiceRef());
     $copyObj->setDiscount($this->getDiscount());
     $copyObj->setPostage($this->getPostage());
     $copyObj->setPostageTax($this->getPostageTax());
     $copyObj->setPostageTaxRuleTitle($this->getPostageTaxRuleTitle());
     $copyObj->setPaymentModuleId($this->getPaymentModuleId());
     $copyObj->setDeliveryModuleId($this->getDeliveryModuleId());
     $copyObj->setStatusId($this->getStatusId());
     $copyObj->setLangId($this->getLangId());
     $copyObj->setCartId($this->getCartId());
     $copyObj->setCreatedAt($this->getCreatedAt());
     $copyObj->setUpdatedAt($this->getUpdatedAt());
     $copyObj->setVersion($this->getVersion());
     $copyObj->setVersionCreatedAt($this->getVersionCreatedAt());
     $copyObj->setVersionCreatedBy($this->getVersionCreatedBy());
     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->getOrderProducts() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addOrderProduct($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getOrderCoupons() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addOrderCoupon($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getOrderVersions() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addOrderVersion($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }
Example #3
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 \App\Propel\Product (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->setResourceId($this->getResourceId());
     $copyObj->setProductName($this->getProductName());
     $copyObj->setProductDescription($this->getProductDescription());
     $copyObj->setCategoryId($this->getCategoryId());
     $copyObj->setProviderId($this->getProviderId());
     $copyObj->setUnitId($this->getUnitId());
     $copyObj->setProductRange($this->getProductRange());
     $copyObj->setProductPrice($this->getProductPrice());
     $copyObj->setProductIsActive($this->getProductIsActive());
     $copyObj->setProductPic($this->getProductPic());
     $copyObj->setCreatedAt($this->getCreatedAt());
     $copyObj->setUpdatedAt($this->getUpdatedAt());
     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->getOrderProducts() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addOrderProduct($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getProductHighlighteds() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addProductHighlighted($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getProductVariationTypes() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addProductVariationType($relObj->copy($deepCopy));
             }
         }
         foreach ($this->getWishlistProducts() as $relObj) {
             if ($relObj !== $this) {
                 // ensure that we don't try to copy a reference to ourselves
                 $copyObj->addWishlistProduct($relObj->copy($deepCopy));
             }
         }
     }
     // if ($deepCopy)
     if ($makeNew) {
         $copyObj->setNew(true);
         $copyObj->setProductId(NULL);
         // this is a auto-increment column, so set to default value
     }
 }