public function removeProductCategory(ProductCategoryInterface $productCategory) { if ($this->productCategories->contains($productCategory)) { $this->productCategories->removeElement($productCategory); } }