src/Entity/Gestiform/Users/Employe.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity\Gestiform\Users;
  3. use App\Entity\Gestiform\Formations\Dossier\Dossier;
  4. use App\Entity\Gestiform\Formations\Dossier\HistoriqueDossier;
  5. use App\Entity\Gestiform\Formations\Dossier\PersonalInformations;
  6. use App\Repository\Gestiform\Users\EmployeRepository;
  7. use Doctrine\Common\Collections\ArrayCollection;
  8. use Doctrine\Common\Collections\Collection;
  9. use Doctrine\ORM\Mapping as ORM;
  10. /**
  11.  * @ORM\Entity(repositoryClass=EmployeRepository::class)
  12.  */
  13. class Employe extends User
  14. {
  15.     /**
  16.      * @ORM\ManyToOne(targetEntity=PersonalInformations::class,  cascade={"all"})
  17.      * @ORM\JoinColumn(nullable=true)
  18.      */
  19.     private ?PersonalInformations $personalInformations null;
  20.     /**
  21.      * @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="reorienter")
  22.      */
  23.     private Collection $dossierReorienters;
  24.     /**
  25.      * @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="referentPedagogique")
  26.      */
  27.     private Collection $referentPedagogiques;
  28.     /**
  29.      * @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="referentCommercial")
  30.      */
  31.     private Collection $referentCommercials;
  32.     /**
  33.      * @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="referentCoach")
  34.      */
  35.     private Collection $referentCoachs;
  36.     /**
  37.      * @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="referentAdministratif")
  38.      */
  39.     private Collection $referentAdministratifs;
  40.     public function __construct()
  41.     {
  42.         $this->dossierReorienters = new ArrayCollection();
  43.         $this->referentPedagogiques = new ArrayCollection();
  44.         $this->referentCommercials = new ArrayCollection();
  45.         $this->referentCoachs = new ArrayCollection();
  46.         $this->referentAdministratifs = new ArrayCollection();
  47.     }
  48.     public function getPersonalInformations(): ?PersonalInformations
  49.     {
  50.         return $this->personalInformations;
  51.     }
  52.     public function setPersonalInformations(?PersonalInformations $personalInformations): self
  53.     {
  54.         $this->personalInformations $personalInformations;
  55.         return $this;
  56.     }
  57.     /**
  58.      * @return Collection<int, HistoriqueDossier>
  59.      */
  60.     public function getDossierReorienters(): Collection
  61.     {
  62.         return $this->dossierReorienters;
  63.     }
  64.     public function addDossierReorienter(Dossier $dossier): self
  65.     {
  66.         if (!$this->dossierReorienters->contains($dossier)) {
  67.             $this->dossierReorienters->add($dossier);
  68.             $dossier->setReorienter($this);
  69.         }
  70.         return $this;
  71.     }
  72.     public function removeDossierReorienter(Dossier $dossier): self
  73.     {
  74.         if ($this->dossierReorienters->removeElement($dossier)) {
  75.             // set the owning side to null (unless already changed)
  76.             if ($dossier->getReorienter() === $this) {
  77.                 $dossier->setReorienter(null);
  78.             }
  79.         }
  80.         return $this;
  81.     }
  82.     /**
  83.      * @return Collection<int, Dossier>
  84.      */
  85.     public function getReferentPedagogiques(): Collection
  86.     {
  87.         return $this->referentPedagogiques;
  88.     }
  89.     public function addReferentPedagogique(Dossier $referentPedagogique): self
  90.     {
  91.         if (!$this->referentPedagogiques->contains($referentPedagogique)) {
  92.             $this->referentPedagogiques->add($referentPedagogique);
  93.             $referentPedagogique->setReferentPedagogique($this);
  94.         }
  95.         return $this;
  96.     }
  97.     public function removeReferentPedagogique(Dossier $referentPedagogique): self
  98.     {
  99.         if ($this->referentPedagogiques->removeElement($referentPedagogique)) {
  100.             // set the owning side to null (unless already changed)
  101.             if ($referentPedagogique->getReferentPedagogique() === $this) {
  102.                 $referentPedagogique->setReferentPedagogique(null);
  103.             }
  104.         }
  105.         return $this;
  106.     }
  107.     /**
  108.      * @return Collection<int, Dossier>
  109.      */
  110.     public function getReferentCommercials(): Collection
  111.     {
  112.         return $this->referentCommercials;
  113.     }
  114.     public function addReferentCommercial(Dossier $referentCommercial): self
  115.     {
  116.         if (!$this->referentCommercials->contains($referentCommercial)) {
  117.             $this->referentCommercials->add($referentCommercial);
  118.             $referentCommercial->setReferentCommercial($this);
  119.         }
  120.         return $this;
  121.     }
  122.     public function removeReferentCommercial(Dossier $referentCommercial): self
  123.     {
  124.         if ($this->referentCommercials->removeElement($referentCommercial)) {
  125.             // set the owning side to null (unless already changed)
  126.             if ($referentCommercial->getReferentCommercial() === $this) {
  127.                 $referentCommercial->setReferentCommercial(null);
  128.             }
  129.         }
  130.         return $this;
  131.     }
  132.     /**
  133.      * @return Collection<int, Dossier>
  134.      */
  135.     public function getReferentCoachs(): Collection
  136.     {
  137.         return $this->referentCoachs;
  138.     }
  139.     public function addReferentCoach(Dossier $referentCoach): self
  140.     {
  141.         if (!$this->referentCoachs->contains($referentCoach)) {
  142.             $this->referentCoachs->add($referentCoach);
  143.             $referentCoach->setReferentCoach($this);
  144.         }
  145.         return $this;
  146.     }
  147.     public function removeReferentCoach(Dossier $referentCoach): self
  148.     {
  149.         if ($this->referentCoachs->removeElement($referentCoach)) {
  150.             // set the owning side to null (unless already changed)
  151.             if ($referentCoach->getReferentCoach() === $this) {
  152.                 $referentCoach->setReferentCoach(null);
  153.             }
  154.         }
  155.         return $this;
  156.     }
  157.     /**
  158.      * @return Collection<int, Dossier>
  159.      */
  160.     public function getReferentAdministratifs(): Collection
  161.     {
  162.         return $this->referentAdministratifs;
  163.     }
  164.     public function addReferentAdministratif(Dossier $referentAdministratif): self
  165.     {
  166.         if (!$this->referentAdministratifs->contains($referentAdministratif)) {
  167.             $this->referentAdministratifs->add($referentAdministratif);
  168.             $referentAdministratif->setReferentAdministratif($this);
  169.         }
  170.         return $this;
  171.     }
  172.     public function removeReferentAdministratif(Dossier $referentAdministratif): self
  173.     {
  174.         if ($this->referentAdministratifs->removeElement($referentAdministratif)) {
  175.             // set the owning side to null (unless already changed)
  176.             if ($referentAdministratif->getReferentAdministratif() === $this) {
  177.                 $referentAdministratif->setReferentAdministratif(null);
  178.             }
  179.         }
  180.         return $this;
  181.     }
  182. }