src/Entity/RendezVousRecurrence.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\RendezVousRecurrenceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=RendezVousRecurrenceRepository::class)
  9.  */
  10. class RendezVousRecurrence
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\OneToMany(targetEntity=Rendezvous::class, mappedBy="rendezVousRecurrence")
  20.      */
  21.     private $recurrence;
  22.     /**
  23.      * @ORM\OneToMany(targetEntity=Rendezvous::class, mappedBy="recurrence")
  24.      */
  25.     private $rendezVouses;
  26.     /**
  27.      * @ORM\Column(type="integer", nullable=true)
  28.      */
  29.     private $id_old;
  30.     public function __construct()
  31.     {
  32.         $this->recurrence = new ArrayCollection();
  33.         $this->rendezVouses = new ArrayCollection();
  34.     }
  35.     public function getId(): ?int
  36.     {
  37.         return $this->id;
  38.     }
  39.     /**
  40.      * @return Collection<int, Rendezvous>
  41.      */
  42.     public function getRendezVouses(): Collection
  43.     {
  44.         return $this->rendezVouses;
  45.     }
  46.     public function addRendezVouse(Rendezvous $rendezVouse): self
  47.     {
  48.         if (!$this->rendezVouses->contains($rendezVouse)) {
  49.             $this->rendezVouses[] = $rendezVouse;
  50.             $rendezVouse->setRecurrence($this);
  51.         }
  52.         return $this;
  53.     }
  54.     public function removeRendezVouse(Rendezvous $rendezVouse): self
  55.     {
  56.         if ($this->rendezVouses->removeElement($rendezVouse)) {
  57.             // set the owning side to null (unless already changed)
  58.             if ($rendezVouse->getRecurrence() === $this) {
  59.                 $rendezVouse->setRecurrence(null);
  60.             }
  61.         }
  62.         return $this;
  63.     }
  64.     public function getIdOld(): ?int
  65.     {
  66.         return $this->id_old;
  67.     }
  68.     public function setIdOld(int $id_old): self
  69.     {
  70.         $this->id_old $id_old;
  71.         return $this;
  72.     }
  73.     /**
  74.      * @return Collection<int, Rendezvous>
  75.      */
  76.     public function getRecurrence(): Collection
  77.     {
  78.         return $this->recurrence;
  79.     }
  80.     public function addRecurrence(Rendezvous $recurrence): self
  81.     {
  82.         if (!$this->recurrence->contains($recurrence)) {
  83.             $this->recurrence->add($recurrence);
  84.             $recurrence->setRecurrence($this);
  85.         }
  86.         return $this;
  87.     }
  88.     public function removeRecurrence(Rendezvous $recurrence): self
  89.     {
  90.         if ($this->recurrence->removeElement($recurrence)) {
  91.             // set the owning side to null (unless already changed)
  92.             if ($recurrence->getRecurrence() === $this) {
  93.                 $recurrence->setRecurrence(null);
  94.             }
  95.         }
  96.         return $this;
  97.     }
  98. }