setVariants() public method

public setVariants ( Doctrine\Common\Collections\Collection $variants )
$variants Doctrine\Common\Collections\Collection
 public function create() : ProductInterface
 {
     $product = new Product();
     $product->setCategories($this->createEmptyCollection());
     $product->setProductPhotos($this->createEmptyCollection());
     $product->setDistinctions($this->createEmptyCollection());
     $product->setVariants($this->createEmptyCollection());
     $product->setShops($this->createEmptyCollection());
     $product->setEnabled(true);
     $product->setSellPrice(new DiscountablePrice());
     $product->setDimension(new Dimension());
     $product->setBuyPrice(new Price());
     $product->setBuyPriceTax(null);
     $product->setSellPriceTax(null);
     $product->setUnit(null);
     $product->setHierarchy(0);
     return $product;
 }