Creates a variation from a given Product and its dependencies.
public createVariation ( Sonata\Component\Product\ProductInterface $product, boolean $copyDependencies = true ) : Sonata\Component\Product\ProductInterface | ||
$product | Sonata\Component\Product\ProductInterface | Product to duplicate |
$copyDependencies | boolean | If false, duplicates only Product (without dependencies) |
return | Sonata\Component\Product\ProductInterface |