Example #1
0
 /**
  * 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;
 }
Example #2
0
 /**
  * {@inheritdoc}
  */
 public function hasProduct(Product $product)
 {
     return $this->products->contains($product);
 }
Example #3
0
 /**
  * @param Product $product
  */
 public function removeProduct($product)
 {
     $this->products->removeElement($product);
 }
Example #4
0
 /**
  * Remove product
  *
  * @param \AppBundle\Entity\Product $product
  */
 public function removeProduct(\AppBundle\Entity\Product $product)
 {
     $this->products->removeElement($product);
 }
Example #5
0
 /**
  * @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;
 }
Example #7
0
 /**
  * Remove parts
  *
  * @param ProductInterface $parts
  */
 public function removePart(ProductInterface $parts)
 {
     return $this->parts->removeElement($parts);
 }