<?php
namespace App\Entity\Gestiform\Users;
use App\Entity\Gestiform\Formations\Dossier\Dossier;
use App\Entity\Gestiform\Formations\Dossier\HistoriqueDossier;
use App\Entity\Gestiform\Formations\Dossier\PersonalInformations;
use App\Repository\Gestiform\Users\EmployeRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=EmployeRepository::class)
*/
class Employe extends User
{
/**
* @ORM\ManyToOne(targetEntity=PersonalInformations::class, cascade={"all"})
* @ORM\JoinColumn(nullable=true)
*/
private ?PersonalInformations $personalInformations = null;
/**
* @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="reorienter")
*/
private Collection $dossierReorienters;
/**
* @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="referentPedagogique")
*/
private Collection $referentPedagogiques;
/**
* @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="referentCommercial")
*/
private Collection $referentCommercials;
/**
* @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="referentCoach")
*/
private Collection $referentCoachs;
/**
* @ORM\OneToMany(targetEntity=Dossier::class, mappedBy="referentAdministratif")
*/
private Collection $referentAdministratifs;
public function __construct()
{
$this->dossierReorienters = new ArrayCollection();
$this->referentPedagogiques = new ArrayCollection();
$this->referentCommercials = new ArrayCollection();
$this->referentCoachs = new ArrayCollection();
$this->referentAdministratifs = new ArrayCollection();
}
public function getPersonalInformations(): ?PersonalInformations
{
return $this->personalInformations;
}
public function setPersonalInformations(?PersonalInformations $personalInformations): self
{
$this->personalInformations = $personalInformations;
return $this;
}
/**
* @return Collection<int, HistoriqueDossier>
*/
public function getDossierReorienters(): Collection
{
return $this->dossierReorienters;
}
public function addDossierReorienter(Dossier $dossier): self
{
if (!$this->dossierReorienters->contains($dossier)) {
$this->dossierReorienters->add($dossier);
$dossier->setReorienter($this);
}
return $this;
}
public function removeDossierReorienter(Dossier $dossier): self
{
if ($this->dossierReorienters->removeElement($dossier)) {
// set the owning side to null (unless already changed)
if ($dossier->getReorienter() === $this) {
$dossier->setReorienter(null);
}
}
return $this;
}
/**
* @return Collection<int, Dossier>
*/
public function getReferentPedagogiques(): Collection
{
return $this->referentPedagogiques;
}
public function addReferentPedagogique(Dossier $referentPedagogique): self
{
if (!$this->referentPedagogiques->contains($referentPedagogique)) {
$this->referentPedagogiques->add($referentPedagogique);
$referentPedagogique->setReferentPedagogique($this);
}
return $this;
}
public function removeReferentPedagogique(Dossier $referentPedagogique): self
{
if ($this->referentPedagogiques->removeElement($referentPedagogique)) {
// set the owning side to null (unless already changed)
if ($referentPedagogique->getReferentPedagogique() === $this) {
$referentPedagogique->setReferentPedagogique(null);
}
}
return $this;
}
/**
* @return Collection<int, Dossier>
*/
public function getReferentCommercials(): Collection
{
return $this->referentCommercials;
}
public function addReferentCommercial(Dossier $referentCommercial): self
{
if (!$this->referentCommercials->contains($referentCommercial)) {
$this->referentCommercials->add($referentCommercial);
$referentCommercial->setReferentCommercial($this);
}
return $this;
}
public function removeReferentCommercial(Dossier $referentCommercial): self
{
if ($this->referentCommercials->removeElement($referentCommercial)) {
// set the owning side to null (unless already changed)
if ($referentCommercial->getReferentCommercial() === $this) {
$referentCommercial->setReferentCommercial(null);
}
}
return $this;
}
/**
* @return Collection<int, Dossier>
*/
public function getReferentCoachs(): Collection
{
return $this->referentCoachs;
}
public function addReferentCoach(Dossier $referentCoach): self
{
if (!$this->referentCoachs->contains($referentCoach)) {
$this->referentCoachs->add($referentCoach);
$referentCoach->setReferentCoach($this);
}
return $this;
}
public function removeReferentCoach(Dossier $referentCoach): self
{
if ($this->referentCoachs->removeElement($referentCoach)) {
// set the owning side to null (unless already changed)
if ($referentCoach->getReferentCoach() === $this) {
$referentCoach->setReferentCoach(null);
}
}
return $this;
}
/**
* @return Collection<int, Dossier>
*/
public function getReferentAdministratifs(): Collection
{
return $this->referentAdministratifs;
}
public function addReferentAdministratif(Dossier $referentAdministratif): self
{
if (!$this->referentAdministratifs->contains($referentAdministratif)) {
$this->referentAdministratifs->add($referentAdministratif);
$referentAdministratif->setReferentAdministratif($this);
}
return $this;
}
public function removeReferentAdministratif(Dossier $referentAdministratif): self
{
if ($this->referentAdministratifs->removeElement($referentAdministratif)) {
// set the owning side to null (unless already changed)
if ($referentAdministratif->getReferentAdministratif() === $this) {
$referentAdministratif->setReferentAdministratif(null);
}
}
return $this;
}
}