Esempio n. 1
0
 /**
  * Clone for attachment
  *
  * @param \XLite\Module\CDev\FileAttachments\Model\Product\Attachment $attachment Attachment
  *
  * @return \XLite\Model\AEntity
  */
 public function cloneEntityForAttachment(\XLite\Module\CDev\FileAttachments\Model\Product\Attachment $attachment)
 {
     $newStorage = parent::cloneEntity();
     $attachment->setStorage($newStorage);
     $newStorage->setAttachment($attachment);
     $newStorage->setPath('');
     $newStorage->loadFromURL(parent::getURL(), true);
     return $newStorage;
 }