src/Entity/LigneBlocageRecurrence.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\LigneBlocageRecurrenceRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=LigneBlocageRecurrenceRepository::class)
  9.  */
  10. class LigneBlocageRecurrence
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\OneToMany(targetEntity=LigneBlocage::class, mappedBy="recurrence")
  20.      */
  21.     private $ligneBlocages;
  22.     /**
  23.      * @ORM\Column(type="integer", nullable=true)
  24.      */
  25.     private $id_old;
  26.     public function __construct()
  27.     {
  28.         $this->ligneBlocages = new ArrayCollection();
  29.     }
  30.     public function getId(): ?int
  31.     {
  32.         return $this->id;
  33.     }
  34.     /**
  35.      * @return Collection<int, LigneBlocage>
  36.      */
  37.     public function getLigneBlocages(): Collection
  38.     {
  39.         return $this->ligneBlocages;
  40.     }
  41.     public function addLigneBlocage(LigneBlocage $ligneBlocage): self
  42.     {
  43.         if (!$this->ligneBlocages->contains($ligneBlocage)) {
  44.             $this->ligneBlocages[] = $ligneBlocage;
  45.             $ligneBlocage->setRecurrence($this);
  46.         }
  47.         return $this;
  48.     }
  49.     public function removeLigneBlocage(LigneBlocage $ligneBlocage): self
  50.     {
  51.         if ($this->ligneBlocages->removeElement($ligneBlocage)) {
  52.             // set the owning side to null (unless already changed)
  53.             if ($ligneBlocage->getRecurrence() === $this) {
  54.                 $ligneBlocage->setRecurrence(null);
  55.             }
  56.         }
  57.         return $this;
  58.     }
  59.     public function getIdOld(): ?int
  60.     {
  61.         return $this->id_old;
  62.     }
  63.     public function setIdOld(int $id_old): self
  64.     {
  65.         $this->id_old $id_old;
  66.         return $this;
  67.     }
  68. }