/** * Sets the properties of the current object to the value they had at a specific version * * @param ChildProductVersion $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 ChildProduct The current object (for fluent API support) */ public function populateFromVersion($version, $con = null, &$loadedObjects = array()) { $loadedObjects['ChildProduct'][$version->getId()][$version->getVersion()] = $this; $this->setId($version->getId()); $this->setTaxRuleId($version->getTaxRuleId()); $this->setRef($version->getRef()); $this->setVisible($version->getVisible()); $this->setPosition($version->getPosition()); $this->setTemplateId($version->getTemplateId()); $this->setBrandId($version->getBrandId()); $this->setVirtual($version->getVirtual()); $this->setCreatedAt($version->getCreatedAt()); $this->setUpdatedAt($version->getUpdatedAt()); $this->setVersion($version->getVersion()); $this->setVersionCreatedAt($version->getVersionCreatedAt()); $this->setVersionCreatedBy($version->getVersionCreatedBy()); return $this; }