/** * Remove item * * @param Product $item * * @return Product */ public function removeProduct(Product $item) { if ($this->products->contains($item)) { $this->products->removeElement($item); $item->setVariant(null); } return $this; }
/** * {@inheritdoc} */ public function hasProduct(Product $product) { return $this->products->contains($product); }
/** * @param Product $product */ public function removeProduct($product) { $this->products->removeElement($product); }
/** * Remove product * * @param \AppBundle\Entity\Product $product */ public function removeProduct(\AppBundle\Entity\Product $product) { $this->products->removeElement($product); }
/** * @param Product $product * * @return $this */ public function removeProduct(Product $product) { if ($this->products->contains($product)) { $this->products->removeElement($product); } return $this; }
/** * @param Product $product * @param $stopPropagation * @return $this */ public function removeProduct(Product $product, $stopPropagation = false) { if (!$stopPropagation) { $product->setPackage(null, true); } $this->products->removeElement($product); return $this; }
/** * Remove parts * * @param ProductInterface $parts */ public function removePart(ProductInterface $parts) { return $this->parts->removeElement($parts); }