/** * {@inheritdoc} */ public function removeCollectionFromProduct(ProductInterface $product, CollectionInterface $collection) { if (!($productCollection = $this->findOneBy(array('collection' => $collection, 'product' => $product)))) { return; } $product->removeProductCollection($productCollection); $this->delete($productCollection); }