Esempio n. 1
0
 /**
  * Clone entity (scalar fields)
  *
  * @param \XLite\Model\Product $newProduct New product
  *
  * @return void
  */
 protected function cloneEntityScalar(\XLite\Model\Product $newProduct)
 {
     $newProduct->setSku(\XLite\Core\Database::getRepo('XLite\\Model\\Product')->assembleUniqueSKU($this->getSku()));
     $newProduct->setName($this->getCloneName($this->getName()));
 }
Esempio n. 2
0
 /**
  * Get deleted product
  *
  * @return \XLite\Model\Product|void
  */
 protected function getDeletedProduct()
 {
     if (!isset($this->dumpProduct)) {
         $this->dumpProduct = new \XLite\Model\Product();
         $this->dumpProduct->setPrice($this->getItemPrice());
         $this->dumpProduct->setName($this->getName());
         $this->dumpProduct->setSku($this->getSku());
     }
     return $this->dumpProduct;
 }
 /**
  * {@inheritDoc}
  */
 public function setSku($sku)
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'setSku', array($sku));
     return parent::setSku($sku);
 }