SHARE
TWEET

Untitled

a guest Oct 10th, 2019 58 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. PromoCode.php
  2.  
  3. /**
  4.  * @ORM\ManyToMany(targetEntity="App\Entity\PromoCodeUsed", inversedBy="promoCodes")
  5.  */
  6.  private $promoCodeUsed;
  7.  
  8.  /**
  9.  * @return Collection|PromoCodeUsed[]
  10.  */
  11. public function getPromoCodeUsed(): Collection
  12.   {
  13.         return $this->promoCodeUsed;
  14.   }
  15.  
  16. public function addPromoCodeUsed(PromoCodeUsed $promoCodeUsed): self
  17.   {
  18.         if (!$this->promoCodeUsed->contains($promoCodeUsed)) {
  19.             $this->promoCodeUsed[] = $promoCodeUsed;
  20.   }
  21.  
  22.         return $this;
  23. }
  24.  
  25.  public function removePromoCodeUsed(PromoCodeUsed $promoCodeUsed): self
  26.     {
  27.     if ($this->promoCodeUsed->contains($promoCodeUsed)) {
  28.           $this->promoCodeUsed->removeElement($promoCodeUsed);
  29.      }
  30.  
  31.         return $this;
  32.  }
  33.  
  34. PromoCodeUsed.php
  35.  /**
  36.  * @return Collection|self[]
  37.  */
  38.  public function getPromoCode(): Collection
  39.     {
  40.         return $this->promoCode;
  41.     }
  42.  
  43.  public function addPromoCode(self $promoCode): self
  44.     {
  45.         if (!$this->promoCode->contains($promoCode)) {
  46.             $this->promoCode[] = $promoCode;
  47.         }
  48.  
  49.         return $this;
  50.     }
  51.  
  52.  public function removePromoCode(self $promoCode): self
  53.     {
  54.         if ($this->promoCode->contains($promoCode)) {
  55.             $this->promoCode->removeElement($promoCode);
  56.         }
  57.  
  58.         return $this;
  59.     }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top