コード例 #1
0
ファイル: Coupon.php プロジェクト: zorn-v/thelia
 /**
  * Sets the properties of the current object to the value they had at a specific version
  *
  * @param ChildCouponVersion $version The version object to use
  * @param ConnectionInterface   $con the connection to use
  * @param array                 $loadedObjects objects that been loaded in a chain of populateFromVersion calls on referrer or fk objects.
  *
  * @return ChildCoupon The current object (for fluent API support)
  */
 public function populateFromVersion($version, $con = null, &$loadedObjects = array())
 {
     $loadedObjects['ChildCoupon'][$version->getId()][$version->getVersion()] = $this;
     $this->setId($version->getId());
     $this->setCode($version->getCode());
     $this->setType($version->getType());
     $this->setSerializedEffects($version->getSerializedEffects());
     $this->setIsEnabled($version->getIsEnabled());
     $this->setExpirationDate($version->getExpirationDate());
     $this->setMaxUsage($version->getMaxUsage());
     $this->setIsCumulative($version->getIsCumulative());
     $this->setIsRemovingPostage($version->getIsRemovingPostage());
     $this->setIsAvailableOnSpecialOffers($version->getIsAvailableOnSpecialOffers());
     $this->setIsUsed($version->getIsUsed());
     $this->setSerializedConditions($version->getSerializedConditions());
     $this->setPerCustomerUsageCount($version->getPerCustomerUsageCount());
     $this->setCreatedAt($version->getCreatedAt());
     $this->setUpdatedAt($version->getUpdatedAt());
     $this->setVersion($version->getVersion());
     $this->setVersionCreatedAt($version->getVersionCreatedAt());
     $this->setVersionCreatedBy($version->getVersionCreatedBy());
     return $this;
 }