Exemple #1
0
 /**
  * Populates the the current object based on a $archiveTablePhpName archive object.
  *
  * @param      ProductArchive $archive An archived object based on the same class
  * @param      Boolean $populateAutoIncrementPrimaryKeys
  *               If true, autoincrement columns are copied from the archive object.
  *               If false, autoincrement columns are left intact.
  *
  * @return     Product The current object (for fluent API support)
  */
 public function populateFromArchive($archive, $populateAutoIncrementPrimaryKeys = false)
 {
     if ($populateAutoIncrementPrimaryKeys) {
         $this->setId($archive->getId());
     }
     $this->setPrincipalId($archive->getPrincipalId());
     $this->setName($archive->getName());
     $this->setNameSlug($archive->getNameSlug());
     $this->setCategory($archive->getCategory());
     $this->setUnit($archive->getUnit());
     $this->setPrice($archive->getPrice());
     $this->setDescription($archive->getDescription());
     $this->setSortableRank($archive->getSortableRank());
     $this->setCreatedAt($archive->getCreatedAt());
     $this->setUpdatedAt($archive->getUpdatedAt());
     return $this;
 }