src/Entity/StatusInscrit.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\StatusInscritRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=StatusInscritRepository::class)
  9.  */
  10. class StatusInscrit
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=255)
  20.      */
  21.     private $wording;
  22.     /**
  23.      * @ORM\Column(type="integer")
  24.      */
  25.     private $position;
  26.     /**
  27.      * @ORM\OneToMany(targetEntity=Inscrit::class, mappedBy="statutinscrit")
  28.      */
  29.     private $inscrits;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=DemandeLite::class, mappedBy="status")
  32.      */
  33.     private $demandeLites;
  34.     public function __construct()
  35.     {
  36.         $this->inscrits = new ArrayCollection();
  37.         $this->demandeLites = new ArrayCollection();
  38.     }
  39.     public function getId(): ?int
  40.     {
  41.         return $this->id;
  42.     }
  43.     public function getWording(): ?string
  44.     {
  45.         return $this->wording;
  46.     }
  47.     public function setWording(string $wording): self
  48.     {
  49.         $this->wording $wording;
  50.         return $this;
  51.     }
  52.     public function getPosition(): ?int
  53.     {
  54.         return $this->position;
  55.     }
  56.     public function setPosition(int $position): self
  57.     {
  58.         $this->position $position;
  59.         return $this;
  60.     }
  61.     /**
  62.      * @return Collection<int, Inscrit>
  63.      */
  64.     public function getInscrits(): Collection
  65.     {
  66.         return $this->inscrits;
  67.     }
  68.     public function addInscrit(Inscrit $inscrit): self
  69.     {
  70.         if (!$this->inscrits->contains($inscrit)) {
  71.             $this->inscrits[] = $inscrit;
  72.             $inscrit->setStatutinscrit($this);
  73.         }
  74.         return $this;
  75.     }
  76.     public function removeInscrit(Inscrit $inscrit): self
  77.     {
  78.         if ($this->inscrits->removeElement($inscrit)) {
  79.             // set the owning side to null (unless already changed)
  80.             if ($inscrit->getStatutinscrit() === $this) {
  81.                 $inscrit->setStatutinscrit(null);
  82.             }
  83.         }
  84.         return $this;
  85.     }
  86.     /**
  87.      * @return Collection<int, DemandeLite>
  88.      */
  89.     public function getDemandeLites(): Collection
  90.     {
  91.         return $this->demandeLites;
  92.     }
  93.     public function addDemandeLite(DemandeLite $demandeLite): self
  94.     {
  95.         if (!$this->demandeLites->contains($demandeLite)) {
  96.             $this->demandeLites[] = $demandeLite;
  97.             $demandeLite->setStatus($this);
  98.         }
  99.         return $this;
  100.     }
  101.     public function removeDemandeLite(DemandeLite $demandeLite): self
  102.     {
  103.         if ($this->demandeLites->removeElement($demandeLite)) {
  104.             // set the owning side to null (unless already changed)
  105.             if ($demandeLite->getStatus() === $this) {
  106.                 $demandeLite->setStatus(null);
  107.             }
  108.         }
  109.         return $this;
  110.     }
  111. }