예제 #1
0
 /**
  * Clone
  *
  * @return \XLite\Model\AEntity
  */
 public function cloneEntity()
 {
     $newEntity = parent::cloneEntity();
     if ($this->getAttributeOption()) {
         if ($this->getAttribute()->getProduct()) {
             $attributeOption = $this->getAttributeOption()->cloneEntity();
             \XLite\Core\Database::getEM()->persist($attributeOption);
         } else {
             $attributeOption = $this->getAttributeOption();
         }
         $newEntity->setAttributeOption($attributeOption);
     }
     return $newEntity;
 }