/** * Create product * * @param array $cell Cell * * @return \XLite\Model\Product */ protected function createProduct(array $cell) { $product = new \XLite\Model\Product(); $product->setInventory($product->getInventory()); $product->getInventory()->setProduct($product); \XLite\Core\Database::getEM()->persist($product); return $product; }
/** * @return XLite\Model\Product */ protected function getProductWithoutInventory() { $this->productWithoutInventory->getInventory()->setEnabled(false); $this->productWithoutInventory->getInventory()->setAmount(self::DEFAULT_INVENTORY_AMOUNT); return $this->productWithoutInventory; }