Sonata\Component\Product\ProductProviderInterface::synchronizeVariationsCollections PHP Method

synchronizeVariationsCollections() public method

Synchronizes parent Product collections to its variations (or a single one if $targetVariation is specified).
public synchronizeVariationsCollections ( Sonata\Component\Product\ProductInterface $product, ArrayCollection $variations = null )
$product Sonata\Component\Product\ProductInterface Parent Product
$variations Doctrine\Common\Collections\ArrayCollection Optional target variations to synchronize
    public function synchronizeVariationsCollections(ProductInterface $product, ArrayCollection $variations = null);