示例#1
0
 /**
  * @return \WellCommerce\Bundle\ProductBundle\Entity\ProductInterface
  */
 public function create()
 {
     $product = new Product();
     $product->setCategories(new ArrayCollection());
     $product->setProductPhotos(new ArrayCollection());
     $product->setStatuses(new ArrayCollection());
     $product->setAttributes(new ArrayCollection());
     $product->setShops(new ArrayCollection());
     $product->setEnabled(true);
     return $product;
 }