src/Entity/OptionCategorieInscrit.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\OptionCategorieInscritRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=OptionCategorieInscritRepository::class)
  9.  */
  10. class OptionCategorieInscrit
  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\ManyToMany(targetEntity=Inscrit::class, mappedBy="optioncategorieinscrit")
  24.      */
  25.     private $inscrits;
  26.     /**
  27.      * @ORM\ManyToOne(targetEntity=Formation::class, inversedBy="optionCategorieInscrits")
  28.      */
  29.     private $formation;
  30.     public function __construct()
  31.     {
  32.         $this->inscrits = new ArrayCollection();
  33.     }
  34.     public function getId(): ?int
  35.     {
  36.         return $this->id;
  37.     }
  38.     public function getWording(): ?string
  39.     {
  40.         return $this->wording;
  41.     }
  42.     public function setWording(string $wording): self
  43.     {
  44.         $this->wording $wording;
  45.         return $this;
  46.     }
  47.     /**
  48.      * @return Collection<int, Inscrit>
  49.      */
  50.     public function getInscrits(): Collection
  51.     {
  52.         return $this->inscrits;
  53.     }
  54.     public function addInscrit(Inscrit $inscrit): self
  55.     {
  56.         if (!$this->inscrits->contains($inscrit)) {
  57.             $this->inscrits[] = $inscrit;
  58.             $inscrit->addOptioncategorieinscrit($this);
  59.         }
  60.         return $this;
  61.     }
  62.     public function removeInscrit(Inscrit $inscrit): self
  63.     {
  64.         if ($this->inscrits->removeElement($inscrit)) {
  65.             $inscrit->removeOptioncategorieinscrit($this);
  66.         }
  67.         return $this;
  68.     }
  69.     public function getFormation(): ?Formation
  70.     {
  71.         return $this->formation;
  72.     }
  73.     public function setFormation(?Formation $formation): self
  74.     {
  75.         $this->formation $formation;
  76.         return $this;
  77.     }
  78. }