<?php
namespace App\Entity\Gestiform\Formations\Dossier;
use App\Entity\AbstractEntity;
use App\Entity\Common\Adresse;
use App\Entity\Common\Convention;
use App\Entity\Common\Document;
use App\Entity\Common\HistoriqueEmail;
use App\Entity\Common\Upload;
use App\Entity\Gestiform\Admin\Cursus\CursusReponses;
use App\Entity\Gestiform\Admin\Cursus\CVdynamique;
use App\Entity\Gestiform\Admin\Cursus\Entretien;
use App\Entity\Gestiform\Admin\Etablissement;
use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
use App\Entity\Gestiform\Admin\Platforme;
use App\Entity\Gestiform\Admin\Profil;
use App\Entity\Gestiform\Admin\Site;
use App\Entity\Gestiform\Admin\Societe;
use App\Entity\Gestiform\Formations\Catalogue\Parcours\Parcours;
use App\Entity\Gestiform\Formations\Devis\Devis;
use App\Entity\Gestiform\Formations\Emargement\EmargementJustificatif;
use App\Entity\Gestiform\Formations\Entreprise\Contact;
use App\Entity\Gestiform\Formations\Entreprise\Entreprise;
use App\Entity\Gestiform\Formations\Facturation\Facturation;
use App\Entity\Gestiform\Formations\Financement\Financement;
use App\Entity\Gestiform\Formations\Reglement\Reglement;
use App\Entity\Gestiform\Formations\Reunion\ReunionDossier;
use App\Entity\Gestiform\Formations\Session\Planning\Planning;
use App\Entity\Gestiform\Formations\Session\Session;
use App\Entity\Gestiform\Quiz\QuizReponse;
use App\Entity\Gestiform\Users\Apprenant;
use App\Entity\Gestiform\Users\Employe;
use App\Entity\Gestiform\Users\HistoriqueChat;
use App\Repository\Gestiform\Formations\Dossier\DossierRepository;
use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\Mapping as ORM;
/**
* @ORM\Entity(repositoryClass=DossierRepository::class)
*/
class Dossier extends AbstractEntity
{
/**
* @ORM\Column(type="string", length=255, nullable=true)
*/
private ?string $reference = null;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $itemsDocument = null;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $panier = null;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $competences = null;
/**
* @ORM\Column(type="text", nullable=true)
*/
private ?string $cart = null;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $mode = null;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $linkedin = null;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $portfolio = null;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $campus = null;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $modaliteEnseignement = null;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $commentaire = null;
/**
* @ORM\Column(type="string", length=255,nullable=true)
*/
private ?string $emailCandidature = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?\DateTime $dateReunion = null;
/**
* @ORM\OneToOne(targetEntity=Upload::class, cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Upload $stopProof = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $stopCause = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $stopType = null;
/**
* @ORM\Column(type="datetime", nullable=true)
*/
private ?\DateTime $stopDate = null;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $candidateAvailable = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $rncp = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $diplomant = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $delegueClasse = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $postulantAvailable = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $prospectAvailable = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $stagiaireAvailable = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $alumniAvailable = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $newsLetter = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $processed = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $statutDeclaration = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $aRepresentantLegal = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $notificationPaiement = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $engagementFormation = false;
/**
* @ORM\Column(type="boolean", nullable=true)
*/
private ?bool $charteFormation = false;
/**
* @ORM\Column( type="boolean", nullable=true)
*/
private ?bool $compteZoom = false;
/**
* @ORM\Column( type="boolean", nullable=true)
*/
private ?bool $notified = false;
/**
* @ORM\Column( type="boolean", nullable=true)
*/
private ?bool $femmeEloigne = false;
/**
* @ORM\Column( type="boolean", nullable=true)
*/
private ?bool $zrr = false;
/**
* @ORM\Column( type="boolean", nullable=true)
*/
private ?bool $qpv = false;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private ?int $participationReglee = null;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private ?int $participation = null;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private ?int $caution = null;
/**
* @ORM\Column(type="decimal", precision=10, scale=2, nullable=true)
*/
private ?int $resteaRegler = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $typeActif = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $dispositif = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $typeFormation = null;
/**
* @ORM\ManyToOne(targetEntity=Masterlistelg::class)
* @ORM\JoinColumn(nullable=true)
*/
private ?Masterlistelg $resultat = null;
/**
* @ORM\ManyToOne(targetEntity=Profil::class, cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Profil $profil = null;
/**
* @ORM\ManyToOne(targetEntity=PersonalInformations::class, cascade={"all"}, cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private ?PersonalInformations $personalInformations = null;
/**
* @ORM\OneToOne(targetEntity=Adresse::class, cascade={"all"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Adresse $adresse = null;
/**
* @ORM\OneToOne(targetEntity=Planning::class, inversedBy="dossier", cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Planning $planning = null;
/**
* @ORM\ManyToOne(targetEntity=Session::class, inversedBy="dossiers")
* @ORM\JoinColumn(nullable=true)
*/
private ?Session $session = null;
/**
* @ORM\ManyToOne(targetEntity=Societe::class, inversedBy="dossiers")
* @ORM\JoinColumn(nullable=true)
*/
private ?Societe $societe = null;
/**
* @ORM\ManyToOne(targetEntity=Site::class, inversedBy="dossiers")
* @ORM\JoinColumn(nullable=true)
*/
private ?Site $site = null;
/**
* @ORM\OneToOne(targetEntity=DossierAnnexes::class, cascade={"all"})
* @ORM\JoinColumn(nullable=true)
*/
private ?DossierAnnexes $dossierannexes = null;
/**
* @ORM\OneToMany(targetEntity=Document::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $documents;
/**
* @ORM\OneToMany(targetEntity=HistoriqueEmail::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $historiqueEmails;
/**
* @ORM\OneToMany(targetEntity=EmargementJustificatif::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $justificatifs;
/**
* @ORM\ManyToOne(targetEntity=Apprenant::class, inversedBy="dossiers",cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Apprenant $apprenant = null;
/**
* @ORM\ManyToOne(targetEntity=Parcours::class, cascade={"persist"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Parcours $parcours = null;
/**
* @ORM\OneToMany(targetEntity=CVdynamique::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $cvDynamiques;
/**
* @ORM\OneToMany(targetEntity=Entretien::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $entretiens;
/**
* @ORM\OneToMany(targetEntity=CursusReponses::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $reponses;
/**
* @ORM\OneToMany(targetEntity=QuizReponse::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $formulaireReponses;
/**
* @ORM\OneToMany(targetEntity=ReunionDossier::class, mappedBy="dossier")
*/
private Collection $reunionDossiers;
/**
* @ORM\OneToMany(targetEntity=HistoriqueDossier::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $historiqueDossiers;
/**
* @ORM\OneToMany(targetEntity=Reglement::class, mappedBy="dossier", orphanRemoval=true, cascade={"persist","remove"})
*/
private Collection $reglements;
/**
* @ORM\ManyToOne(targetEntity=Employe::class, inversedBy="dossierReorienters")
* @ORM\JoinColumn(nullable=true)
*/
private ?Employe $reorienter = null;
/**
* @ORM\ManyToOne(targetEntity=Employe::class, inversedBy="referentPedagogiques")
* @ORM\JoinColumn(nullable=true)
*/
private ?Employe $referentPedagogique = null;
/**
* @ORM\ManyToOne(targetEntity=Employe::class, inversedBy="referentCommercials")
* @ORM\JoinColumn(nullable=true)
*/
private ?Employe $referentCommercial = null;
/**
* @ORM\ManyToOne(targetEntity=Employe::class, inversedBy="referentCoachs")
* @ORM\JoinColumn(nullable=true)
*/
private ?Employe $referentCoach = null;
/**
* @ORM\ManyToOne(targetEntity=Employe::class, inversedBy="referentAdministratifs")
* @ORM\JoinColumn(nullable=true)
*/
private ?Employe $referentAdministratif = null;
/**
* @ORM\OneToMany(targetEntity=Convention::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $conventions;
/**
* @ORM\OneToMany(targetEntity=Devis::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $deviss;
/**
* @ORM\ManyToMany(targetEntity=Devis::class, inversedBy="dossiers")
*/
private Collection $devisEntreprises;
/**
* @ORM\ManyToOne(targetEntity=Entreprise::class, inversedBy="dossiers")
*/
private ?Entreprise $entreprise = null;
/**
* @ORM\ManyToOne(targetEntity=Contact::class, inversedBy="dossiers")
*/
private ?Contact $entrepriseContact = null;
/**
* @ORM\OneToOne(targetEntity=Upload::class, cascade={"persist", "remove"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Upload $cv = null;
/**
* @ORM\OneToMany(targetEntity=Financement::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $financements;
/**
* @ORM\ManyToOne(targetEntity=Platforme::class,inversedBy="dossiers")
* @ORM\JoinColumn(nullable=true)
*/
private ?Platforme $platforme = null;
/**
* @ORM\OneToMany(targetEntity=DossierQuiz::class, mappedBy="dossier", cascade={"all"})
*/
private Collection $dossierQuizzs;
/**
* @ORM\OneToMany(targetEntity=HistoriqueComment::class, mappedBy="dossier", cascade={"all"})
*/
private Collection $historiqueComments;
/**
* @ORM\OneToMany(targetEntity=HistoriqueChat::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $historiqueChats;
/**
* @ORM\OneToOne(targetEntity=Diplome::class, mappedBy="dossier", cascade={"persist"})
*/
private ?Diplome $diplome = null;
/**
* @ORM\OneToMany(targetEntity=Avertissement::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $avertissements;
/**
* @ORM\ManyToOne(targetEntity=Contact::class, cascade={"all"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Contact $emergencyContact = null;
/**
* @ORM\ManyToOne(targetEntity=Contact::class, cascade={"all"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Contact $legalRepresentative = null;
/**
* @ORM\ManyToOne(targetEntity=Etablissement::class, cascade={"all"})
* @ORM\JoinColumn(nullable=true)
*/
private ?Etablissement $etablissement = null;
/**
* @ORM\OneToMany(targetEntity=Facturation::class, mappedBy="dossier",cascade={"persist"})
*/
private Collection $facturations;
public function __construct()
{
$this->documents = new ArrayCollection();
$this->historiqueEmails = new ArrayCollection();
$this->cvDynamiques = new ArrayCollection();
$this->entretiens = new ArrayCollection();
$this->reponses = new ArrayCollection();
$this->reglements = new ArrayCollection();
$this->historiqueDossiers = new ArrayCollection();
$this->conventions = new ArrayCollection();
$this->deviss = new ArrayCollection();
$this->devisEntreprises = new ArrayCollection();
$this->financements = new ArrayCollection();
$this->reunionDossiers = new ArrayCollection();
$this->dossierQuizzs = new ArrayCollection();
$this->historiqueComments = new ArrayCollection();
$this->historiqueChats = new ArrayCollection();
$this->justificatifs = new ArrayCollection();
$this->avertissements = new ArrayCollection();
$this->facturations = new ArrayCollection();
$this->formulaireReponses = new ArrayCollection();
}
public function getReference(): ?string
{
return $this->reference;
}
public function setReference(?string $reference): self
{
$this->reference = $reference;
return $this;
}
public function getPlanningOrSessionPlanning(): ?Planning
{
return $this->planning ?? $this->getSession()->getPlanning();
}
public function getPlanning(): ?Planning
{
return $this->planning;
}
public function setPlanning(?Planning $planning): self
{
$this->planning = $planning;
return $this;
}
public function getSession(): ?Session
{
return $this->session;
}
public function setSession(?Session $session): self
{
$this->session = $session;
return $this;
}
public function getCommentaire(): ?string
{
return $this->commentaire;
}
public function setCommentaire(?string $commentaire): self
{
$this->commentaire = $commentaire;
return $this;
}
public function getMode(): ?string
{
return $this->mode;
}
public function setMode(?string $mode): self
{
$this->mode = $mode;
return $this;
}
public function getCampus(): ?string
{
return $this->campus;
}
public function setCampus(?string $campus): self
{
$this->campus = $campus;
return $this;
}
public function getDateReunion(): ?\DateTime
{
return $this->dateReunion;
}
public function setDateReunion(?\DateTime $dateReunion): self
{
$this->dateReunion = $dateReunion;
return $this;
}
public function getEmailCandidature(): ?string
{
return $this->emailCandidature;
}
public function setEmailCandidature(?string $emailCandidature): self
{
$this->emailCandidature = $emailCandidature;
return $this;
}
public function isNewsLetter(): ?bool
{
return $this->newsLetter;
}
public function setNewsLetter(?bool $newsLetter): self
{
$this->newsLetter = $newsLetter;
return $this;
}
public function isProcessed(): ?bool
{
return $this->processed;
}
public function setProcessed(?bool $processed): self
{
$this->processed = $processed;
return $this;
}
public function getTypeActif(): ?Masterlistelg
{
return $this->typeActif;
}
public function setTypeActif(?Masterlistelg $typeActif): self
{
$this->typeActif = $typeActif;
return $this;
}
public function getDispositif(): ?Masterlistelg
{
return $this->dispositif;
}
public function setDispositif(?Masterlistelg $dispositif): self
{
$this->dispositif = $dispositif;
return $this;
}
public function getProfil(): ?Profil
{
return $this->profil;
}
public function setProfil(?Profil $profil): self
{
$this->profil = $profil;
return $this;
}
public function getPersonalInformations(): ?PersonalInformations
{
return $this->personalInformations;
}
public function setPersonalInformations(?PersonalInformations $personalInformations): self
{
$this->personalInformations = $personalInformations;
return $this;
}
public function getAdresse(): ?Adresse
{
return $this->adresse;
}
public function setAdresse(?Adresse $adresse): self
{
$this->adresse = $adresse;
return $this;
}
public function getDossierannexes(): ?DossierAnnexes
{
return $this->dossierannexes;
}
public function setDossierannexes(?DossierAnnexes $dossierannexes): self
{
$this->dossierannexes = $dossierannexes;
return $this;
}
public function getTypeFormation(): ?Masterlistelg
{
return $this->typeFormation;
}
public function setTypeFormation(?Masterlistelg $typeFormation): self
{
$this->typeFormation = $typeFormation;
return $this;
}
/**
* @return Collection<int, Document>
*/
public function getDocuments(): Collection
{
return $this->documents;
}
public function addDocument(Document $document): self
{
if (!$this->documents->contains($document)) {
$this->documents->add($document);
$document->setDossier($this);
}
return $this;
}
public function removeDocument(Document $document): self
{
if ($this->documents->removeElement($document)) {
// set the owning side to null (unless already changed)
if ($document->getDossier() === $this) {
$document->setDossier(null);
}
}
return $this;
}
/**
* @return Collection<int, HistoriqueEmail>
*/
public function getHistoriqueEmails(): Collection
{
return $this->historiqueEmails;
}
public function addHistoriqueEmail(HistoriqueEmail $historiqueEmail): self
{
if (!$this->historiqueEmails->contains($historiqueEmail)) {
$this->historiqueEmails->add($historiqueEmail);
$historiqueEmail->setDossier($this);
}
return $this;
}
public function removeHistoriqueEmail(HistoriqueEmail $historiqueEmail): self
{
if ($this->historiqueEmails->removeElement($historiqueEmail)) {
// set the owning side to null (unless already changed)
if ($historiqueEmail->getDossier() === $this) {
$historiqueEmail->setDossier(null);
}
}
return $this;
}
public function getApprenant(): ?Apprenant
{
return $this->apprenant;
}
public function setApprenant(?Apprenant $apprenant): self
{
$this->apprenant = $apprenant;
return $this;
}
public function getParcours(): ?Parcours
{
return $this->parcours;
}
public function setParcours(?Parcours $parcours): self
{
$this->parcours = $parcours;
return $this;
}
/**
* @return Collection<int, CVdynamique>
*/
public function getCVDynamiques(): Collection
{
return $this->cvDynamiques;
}
public function addCVDynamique(CVdynamique $cvDynamique): self
{
if (!$this->cvDynamiques->contains($cvDynamique)) {
$this->cvDynamiques->add($cvDynamique);
$cvDynamique->setDossier($this);
}
return $this;
}
public function removeCVDynamique(CVdynamique $cVDynamique): self
{
if ($this->cvDynamiques->removeElement($cVDynamique)) {
// set the owning side to null (unless already changed)
if ($cVDynamique->getDossier() === $this) {
$cVDynamique->setDossier(null);
}
}
return $this;
}
public function addEntretien(Entretien $entretien): self
{
if (!$this->entretiens->contains($entretien)) {
$this->entretiens->add($entretien);
$entretien->setDossier($this);
}
return $this;
}
public function removeEntretien(Entretien $entretien): self
{
if ($this->entretiens->removeElement($entretien)) {
// set the owning side to null (unless already changed)
if ($entretien->getDossier() === $this) {
$entretien->setDossier(null);
}
}
return $this;
}
/**
* @return Collection<int, CursusReponses>
*/
public function getCursusReponses(): Collection
{
return $this->reponses;
}
public function addCursusReponse(CursusReponses $reponse): self
{
if (!$this->reponses->contains($reponse)) {
$this->reponses->add($reponse);
$reponse->setDossier($this);
}
return $this;
}
public function removeCursusReponse(CursusReponses $reponse): self
{
if ($this->reponses->removeElement($reponse)) {
// set the owning side to null (unless already changed)
if ($reponse->getDossier() === $this) {
$reponse->setDossier(null);
}
}
return $this;
}
/**
* @return Collection<int, HistoriqueDossier>
*/
public function getHistoriqueDossiers(): Collection
{
return $this->historiqueDossiers;
}
public function addHistoriqueDossier(HistoriqueDossier $historiqueDossier): self
{
if (!$this->historiqueDossiers->contains($historiqueDossier)) {
$this->historiqueDossiers->add($historiqueDossier);
$historiqueDossier->setDossier($this);
}
return $this;
}
public function removeHistoriqueDossier(HistoriqueDossier $historiqueDossier): self
{
if ($this->historiqueDossiers->removeElement($historiqueDossier)) {
// set the owning side to null (unless already changed)
if ($historiqueDossier->getDossier() === $this) {
$historiqueDossier->setDossier(null);
}
}
return $this;
}
public function getReorienter(): ?Employe
{
return $this->reorienter;
}
public function setReorienter(?Employe $reorienter): self
{
$this->reorienter = $reorienter;
return $this;
}
/**
* @return Collection<int, Reglement>
*/
public function getReglements(): Collection
{
return $this->reglements;
}
public function addReglement(Reglement $reglement): self
{
if (!$this->reglements->contains($reglement)) {
$this->reglements->add($reglement);
$reglement->setDossier($this);
}
return $this;
}
public function removeReglement(Reglement $reglement): self
{
if ($this->reglements->removeElement($reglement)) {
// set the owning side to null (unless already changed)
if ($reglement->getDossier() === $this) {
$reglement->setDossier(null);
}
}
return $this;
}
public function getParticipationReglee(): ?string
{
return $this->participationReglee;
}
public function setParticipationReglee(?string $participationReglee): self
{
$this->participationReglee = $participationReglee;
return $this;
}
public function getParticipation(): ?string
{
return $this->participation;
}
public function setParticipation(?string $participation): self
{
$this->participation = $participation;
return $this;
}
public function getCaution(): ?string
{
return $this->caution;
}
public function setCaution(?string $caution): self
{
$this->caution = $caution;
return $this;
}
public function getResteaRegler(): ?string
{
return $this->resteaRegler;
}
public function setResteaRegler(?string $resteaRegler): self
{
$this->resteaRegler = $resteaRegler;
return $this;
}
/**
* @return Collection<int, CursusReponses>
*/
public function getReponses(): Collection
{
return $this->reponses;
}
public function addReponse(CursusReponses $reponse): self
{
if (!$this->reponses->contains($reponse)) {
$this->reponses->add($reponse);
$reponse->setDossier($this);
}
return $this;
}
public function removeReponse(CursusReponses $reponse): self
{
if ($this->reponses->removeElement($reponse)) {
// set the owning side to null (unless already changed)
if ($reponse->getDossier() === $this) {
$reponse->setDossier(null);
}
}
return $this;
}
public function getReferentPedagogique(): ?Employe
{
return $this->referentPedagogique;
}
public function setReferentPedagogique(?Employe $referentPedagogique): self
{
$this->referentPedagogique = $referentPedagogique;
return $this;
}
public function getReferentCommercial(): ?Employe
{
return $this->referentCommercial;
}
public function setReferentCommercial(?Employe $referentCommercial): self
{
$this->referentCommercial = $referentCommercial;
return $this;
}
public function getReferentCoach(): ?Employe
{
return $this->referentCoach;
}
public function setReferentCoach(?Employe $referentCoach): self
{
$this->referentCoach = $referentCoach;
return $this;
}
public function getReferentAdministratif(): ?Employe
{
return $this->referentAdministratif;
}
public function setReferentAdministratif(?Employe $referentAdministratif): self
{
$this->referentAdministratif = $referentAdministratif;
return $this;
}
/**
* @return Collection<int, Convention>
*/
public function getConventions(): Collection
{
return $this->conventions;
}
public function addConvention(Convention $convention): self
{
if (!$this->conventions->contains($convention)) {
$this->conventions->add($convention);
$convention->setDossier($this);
}
return $this;
}
public function removeConvention(Convention $convention): self
{
if ($this->conventions->removeElement($convention)) {
// set the owning side to null (unless already changed)
if ($convention->getDossier() === $this) {
$convention->setDossier(null);
}
}
return $this;
}
public function getConvention($type): ?Convention
{
foreach ($this->conventions as $convention) {
if (
($convention->getState()?->getCode() === 'terminee' || $convention->getState()?->getCode() === 'validee')
&& $convention->getType()?->getCode() === $type
) {
return $convention;
}
}
return null;
}
public function addDeviss(Devis $deviss): self
{
if (!$this->deviss->contains($deviss)) {
$this->deviss->add($deviss);
$deviss->setDossier($this);
}
return $this;
}
public function removeDeviss(Devis $deviss): self
{
if ($this->deviss->removeElement($deviss)) {
// set the owning side to null (unless already changed)
if ($deviss->getDossier() === $this) {
$deviss->setDossier(null);
}
}
return $this;
}
public function addDevisEntreprise(Devis $devisEntreprise): self
{
if (!$this->devisEntreprises->contains($devisEntreprise)) {
$this->devisEntreprises->add($devisEntreprise);
}
return $this;
}
public function removeDevisEntreprise(Devis $devisEntreprise): self
{
$this->devisEntreprises->removeElement($devisEntreprise);
return $this;
}
public function getEntreprise(): ?Entreprise
{
return $this->entreprise;
}
public function setEntreprise(?Entreprise $entreprise): self
{
$this->entreprise = $entreprise;
return $this;
}
public function isCompteZoom(): ?bool
{
return $this->compteZoom;
}
public function setCompteZoom(?bool $compteZoom): self
{
$this->compteZoom = $compteZoom;
return $this;
}
public function getCv(): ?Upload
{
return $this->cv;
}
public function setCv(?Upload $cv): self
{
$this->cv = $cv;
return $this;
}
public function addFinancement(Financement $financement): self
{
if (!$this->financements->contains($financement)) {
$this->financements->add($financement);
$financement->setDossier($this);
}
return $this;
}
public function removeFinancement(Financement $financement): self
{
if ($this->financements->removeElement($financement)) {
// set the owning side to null (unless already changed)
if ($financement->getDossier() === $this) {
$financement->setDossier(null);
}
}
return $this;
}
public function getDetailFinancement(): array
{
$resultat = [];
$resultat['nbfinancements'] = 0;
$resultat['montantht'] = 0;
$resultat['montanttva'] = 0;
$resultat['montantttc'] = 0;
foreach ($this->getFinancements() as $ligne) {
$resultat['montantht'] += $ligne->getMontantHt();
$resultat['montanttva'] += $ligne->getMontantTva();
$resultat['montantttc'] += $ligne->getMontantTtc();
++$resultat['nbfinancements'];
}
return $resultat;
}
/**
* @return Collection<int, Financement>
*/
public function getFinancements(): Collection
{
return $this->financements;
}
public function getAllFrais(): float
{
$resultat = 0;
if (!is_null($this->getDevisActif())) {
foreach ($this->getDevisActif()?->getDevisLignes() as $ligne) {
if (!$ligne->isChargeHT()) {
$resultat += $ligne->getMontantHT();
}
}
}
return $resultat;
}
public function getDevisActif(): Devis|null
{
$devis = null;
foreach ($this->getDeviss() as $l) {
if (!is_null($l->getState()) && $l->getState()?->getCode() === 'accord') {
$devis = $l;
}
}
if (!is_null($this->getDevisEntreprises())) {
foreach ($this->getDevisEntreprises() as $l2) {
if (!is_null($l2->getState()) && $l2->getState()?->getCode() === 'accord') {
$devis = $l2;
}
}
}
return $devis;
}
/**
* @return Collection<int, Devis>
*/
public function getDeviss(): Collection
{
return $this->deviss;
}
/**
* @return Collection<int, Devis>
*/
public function getDevisEntreprises(): Collection
{
return $this->devisEntreprises;
}
public function isNotificationPaiement(): ?bool
{
return $this->notificationPaiement;
}
public function setNotificationPaiement(?bool $notificationPaiement): self
{
$this->notificationPaiement = $notificationPaiement;
return $this;
}
public function getPlatforme(): ?Platforme
{
return $this->platforme;
}
public function setPlatforme(?Platforme $platforme): self
{
$this->platforme = $platforme;
return $this;
}
public function getEntretienActif()
{
if ($this->getEntretiens()->first()) {
return $this->getEntretiens()->first();
}
return null;
}
/**
* @return Collection<int, Entretien>
*/
public function getEntretiens(): Collection
{
return $this->entretiens;
}
/**
* @return Collection<int, ReunionDossier>
*/
public function getReunionDossiers(): Collection
{
return $this->reunionDossiers;
}
public function addReunionDossier(ReunionDossier $reunionDossier): self
{
if (!$this->reunionDossiers->contains($reunionDossier)) {
$this->reunionDossiers->add($reunionDossier);
$reunionDossier->setDossier($this);
}
return $this;
}
public function removeReunionDossier(ReunionDossier $reunionDossier): self
{
if ($this->reunionDossiers->removeElement($reunionDossier)) {
// set the owning side to null (unless already changed)
if ($reunionDossier->getDossier() === $this) {
$reunionDossier->setDossier(null);
}
}
return $this;
}
public function isCandidateAvailable(): ?bool
{
return $this->candidateAvailable;
}
public function setCandidateAvailable(?bool $candidateAvailable): self
{
$this->candidateAvailable = $candidateAvailable;
return $this;
}
public function isPostulantAvailable(): ?bool
{
return $this->postulantAvailable;
}
public function setPostulantAvailable(?bool $postulantAvailable): self
{
$this->postulantAvailable = $postulantAvailable;
return $this;
}
public function isProspectAvailable(): ?bool
{
return $this->prospectAvailable;
}
public function setProspectAvailable(?bool $prospectAvailable): self
{
$this->prospectAvailable = $prospectAvailable;
return $this;
}
public function isStagiaireAvailable(): ?bool
{
return $this->stagiaireAvailable;
}
public function setStagiaireAvailable(?bool $stagiaireAvailable): self
{
$this->stagiaireAvailable = $stagiaireAvailable;
return $this;
}
public function isAlumniAvailable(): ?bool
{
return $this->alumniAvailable;
}
public function setAlumniAvailable(?bool $alumniAvailable): self
{
$this->alumniAvailable = $alumniAvailable;
return $this;
}
/**
* @throws \JsonException
*/
public function addItemsDocument(string $intitule, string $urltemplate, $type): self
{
$exit = false;
$items = $this->getItemsDocument();
foreach ($items as $item) {
if ($item['intitule'] === $intitule) {
$exit = true;
}
}
if (!$exit) {
$items[] = [
'intitule' => $intitule,
'urltemplate' => $urltemplate,
'type' => $type
];
}
$this->itemsDocument = json_encode($items, JSON_THROW_ON_ERROR);
return $this;
}
/**
* @throws \JsonException
*/
public function getItemsDocument()
{
if ($this->itemsDocument === null) {
return [];
}
return json_decode($this->itemsDocument, true, 512, JSON_THROW_ON_ERROR);
}
public function setItemsDocument(?string $itemsDocument): self
{
$this->itemsDocument = $itemsDocument;
return $this;
}
/**
* @throws \JsonException
*/
public function removeItemDocument(int $templateId): self
{
$items = $this->getItemsDocument();
if (array_key_exists($templateId, $items) === true) {
unset($items[$templateId]);
}
$this->itemsDocument = json_encode($items, JSON_THROW_ON_ERROR);
return $this;
}
public function removeItemsDocument(): self
{
$this->itemsDocument = NULL;
return $this;
}
public function isEngagementFormation(): ?bool
{
return $this->engagementFormation;
}
public function setEngagementFormation(?bool $engagementFormation): self
{
$this->engagementFormation = $engagementFormation;
return $this;
}
public function isCharteFormation(): ?bool
{
return $this->charteFormation;
}
public function setCharteFormation(?bool $charteFormation): self
{
$this->charteFormation = $charteFormation;
return $this;
}
public function getSociete(): ?Societe
{
return $this->societe;
}
public function setSociete(?Societe $societe): self
{
$this->societe = $societe;
return $this;
}
public function getSite(): ?Site
{
return $this->site;
}
public function setSite(?Site $site): self
{
$this->site = $site;
return $this;
}
/**
* @return Collection<int, DossierQuiz>
*/
public function getDossierQuizzs(): Collection
{
return $this->dossierQuizzs;
}
public function setDossierQuizzes(Collection $quizzes): self
{
$this->dossierQuizzs = $quizzes;
return $this;
}
public function addDossierQuizz(DossierQuiz $dossierQuizz): self
{
if (!$this->dossierQuizzs->contains($dossierQuizz)) {
$this->dossierQuizzs->add($dossierQuizz);
$dossierQuizz->setDossier($this);
}
return $this;
}
public function removeDossierQuizz(DossierQuiz $dossierQuizz): self
{
// set the owning side to null (unless already changed)
if ($this->dossierQuizzs->removeElement($dossierQuizz) && $dossierQuizz->getDossier() === $this) {
$dossierQuizz->setDossier(null);
}
return $this;
}
/**
* @return Collection<int, HistoriqueComment>
*/
public function getHistoriqueComments(): Collection
{
return $this->historiqueComments;
}
public function addHistoriqueComment(HistoriqueComment $historiqueComment): self
{
if (!$this->historiqueComments->contains($historiqueComment)) {
$this->historiqueComments->add($historiqueComment);
$historiqueComment->setDossier($this);
}
return $this;
}
public function removeHistoriqueComment(HistoriqueComment $historiqueComment): self
{
if ($this->historiqueComments->removeElement($historiqueComment)) {
// set the owning side to null (unless already changed)
if ($historiqueComment->getDossier() === $this) {
$historiqueComment->setDossier(null);
}
}
return $this;
}
/**
* @return Collection<int, HistoriqueChat>
*/
public function getHistoriqueChats(): Collection
{
return $this->historiqueChats;
}
public function addHistoriqueChat(HistoriqueChat $historiqueChat): self
{
if (!$this->historiqueChats->contains($historiqueChat)) {
$this->historiqueChats->add($historiqueChat);
$historiqueChat->setDossier($this);
}
return $this;
}
public function removeHistoriqueChat(HistoriqueChat $historiqueChat): self
{
if ($this->historiqueChats->removeElement($historiqueChat)) {
// set the owning side to null (unless already changed)
if ($historiqueChat->getDossier() === $this) {
$historiqueChat->setDossier(null);
}
}
return $this;
}
public function isNotified(): ?bool
{
return $this->notified;
}
public function setNotified(?bool $notified): self
{
$this->notified = $notified;
return $this;
}
/**
* @return Collection<int, EmargementJustificatif>
*/
public function getJustificatifs(): Collection
{
return $this->justificatifs;
}
public function addJustificatif(EmargementJustificatif $justificatif): self
{
if (!$this->justificatifs->contains($justificatif)) {
$this->justificatifs->add($justificatif);
$justificatif->setDossier($this);
}
return $this;
}
public function removeJustificatif(EmargementJustificatif $justificatif): self
{
if ($this->justificatifs->removeElement($justificatif)) {
// set the owning side to null (unless already changed)
if ($justificatif->getDossier() === $this) {
$justificatif->setDossier(null);
}
}
return $this;
}
public function isRncp(): ?bool
{
return $this->rncp;
}
public function setRncp(?bool $rncp): self
{
$this->rncp = $rncp;
return $this;
}
public function getDiplome(): ?Diplome
{
return $this->diplome;
}
public function setDiplome(?Diplome $diplome): Dossier
{
$this->diplome = $diplome;
return $this;
}
/**
* @throws \JsonException
*/
public function addCart(string $idModule, string $intitule): self
{
$exit = false;
$items = $this->getCart();
foreach ($items as $item) {
if ($item['id'] === $idModule) {
$exit = true;
}
}
if (!$exit) {
$items[] = [
'id' => $idModule,
'intitule' => $intitule,
];
}
$this->cart = json_encode($items, JSON_THROW_ON_ERROR);
return $this;
}
public function getCart()
{
if ($this->cart === null) {
return [];
}
return json_decode($this->cart, true, 512, JSON_THROW_ON_ERROR);
}
public function setCart(?string $cart): self
{
$this->cart = $cart;
return $this;
}
/**
* @throws \JsonException
*/
public function removeCart(int $idModule): self
{
$items = $this->getCart();
if (array_key_exists($idModule, $items) === true) {
unset($items[$idModule]);
}
$this->cart = json_encode($items, JSON_THROW_ON_ERROR);
return $this;
}
public function removeCarts(): self
{
$this->cart = NULL;
return $this;
}
public function getResultat(): ?Masterlistelg
{
return $this->resultat;
}
public function setResultat(?Masterlistelg $resultat): self
{
$this->resultat = $resultat;
return $this;
}
public function getStopProof(): ?Upload
{
return $this->stopProof;
}
public function setStopProof(?Upload $stopProof): self
{
$this->stopProof = $stopProof;
return $this;
}
public function getStopCause(): ?Masterlistelg
{
return $this->stopCause;
}
public function setStopCause(?Masterlistelg $stopCause): self
{
$this->stopCause = $stopCause;
return $this;
}
public function getStopType(): ?Masterlistelg
{
return $this->stopType;
}
public function setStopType(?Masterlistelg $stopType): self
{
$this->stopType = $stopType;
return $this;
}
public function getStopDate(): ?\DateTime
{
return $this->stopDate;
}
public function setStopDate(?\DateTime $stopDate): self
{
$this->stopDate = $stopDate;
return $this;
}
public function &getCompetenceById(int $blocId, int $id): ?array
{
$blocsCompetences = $this->getCompetences();
return $blocsCompetences[$blocId]['competences'][$id];
}
public function getCompetences(): array
{
return $this->competences ? json_decode($this->competences, true) : [];
}
public function setCompetences(array $competences): self
{
$this->competences = json_encode($competences);
return $this;
}
public function addCompetence(int $blocId, string $intituleBloc, int $id, string $intitule, string $result, string $commentaire): self
{
// Décodez les compétences existantes
$blocsCompetences = $this->getCompetences();
// Si le bloc n'existe pas encore, initialisez-le
if (!isset($blocsCompetences[$blocId])) {
$blocsCompetences[$blocId] = [
'intitule' => $intituleBloc,
'evaluation' => 0,
'id' => $blocId,
'competences' => []
];
}
// Référence au tableau de compétences du bloc
$competences = &$blocsCompetences[$blocId]['competences'];
// Mise à jour ou ajout de la compétence
$found = false;
foreach ($competences as &$competence) {
if ($competence['id'] == $id) {
$competence['intitule'] = $intitule;
$found = true;
break;
}
}
if (!$found) {
$competences[$id] = [
'id' => $id,
'intitule' => $intitule,
'result' => $result,
'commentaire' => $commentaire
];
}
// Encodez les données mises à jour
$this->competences = json_encode($blocsCompetences, JSON_THROW_ON_ERROR);
return $this;
}
public function editCompetence(int $blocId, string $intituleBloc, int $id, string $intitule, string $result, string $commentaire): self
{
// Décodez les compétences existantes
$blocsCompetences = $this->getCompetences();
// Si le bloc n'existe pas encore, initialisez-le
if (!isset($blocsCompetences[$blocId])) {
$blocsCompetences[$blocId] = [
'evaluation' => 0,
'intitule' => $intituleBloc,
'competences' => []
];
}
// Référence au tableau de compétences du bloc
$competences = &$blocsCompetences[$blocId]['competences'];
// Mise à jour ou ajout de la compétence
$found = false;
foreach ($competences as &$competence) {
if ($competence['id'] === $id) {
$competence['result'] = $result;
$competence['commentaire'] = $commentaire;
$found = true;
break;
}
}
if (!$found) {
$competences[$id] = [
'id' => $id,
'intitule' => $intitule,
'result' => $result,
'commentaire' => $commentaire
];
}
// Encodez les données mises à jour
$this->competences = json_encode($blocsCompetences, JSON_THROW_ON_ERROR);
return $this;
}
public function updateBlocEvaluation(int $blocId, int $evaluation): self
{
$blocsCompetences = $this->getCompetences();
if (isset($blocsCompetences[$blocId])) {
$blocsCompetences[$blocId]['evaluation'] = $evaluation;
$this->setCompetences($blocsCompetences);
}
return $this;
}
public function getBlocEvaluation(int $blocId): int
{
$blocsCompetences = $this->getCompetences();
return $blocsCompetences[$blocId]['evaluation'] ?? 0;
}
public function removeCompetence(int $blocId, int $id): self
{
$blocsCompetences = $this->getCompetences();
if (isset($blocsCompetences[$blocId])) {
$competences = &$blocsCompetences[$blocId]['competences'];
foreach ($competences as $key => $competence) {
if ($competence['id'] === $id) {
unset($competences[$key]);
$blocsCompetences[$blocId]['competences'] = array_values($competences);
$this->setCompetences($blocsCompetences);
break;
}
}
}
return $this;
}
public function clearCompetences(): self
{
$this->competences = null;
return $this;
}
/**
* @return Collection<int, Avertissement>
*/
public function getAvertissements(): Collection
{
return $this->avertissements;
}
public function addAvertissement(Avertissement $avertissement): self
{
if (!$this->avertissements->contains($avertissement)) {
$this->avertissements->add($avertissement);
$avertissement->setDossier($this);
}
return $this;
}
public function removeAvertissement(Avertissement $avertissement): self
{
if ($this->avertissements->removeElement($avertissement)) {
// set the owning side to null (unless already changed)
if ($avertissement->getDossier() === $this) {
$avertissement->setDossier(null);
}
}
return $this;
}
public function getLinkedin(): ?string
{
return $this->linkedin;
}
public function setLinkedin(?string $linkedin): self
{
$this->linkedin = $linkedin;
return $this;
}
public function getPortfolio(): ?string
{
return $this->portfolio;
}
public function setPortfolio(?string $portfolio): self
{
$this->portfolio = $portfolio;
return $this;
}
public function getEmergencyContact(): ?Contact
{
return $this->emergencyContact;
}
public function setEmergencyContact(?Contact $emergencyContact): self
{
$this->emergencyContact = $emergencyContact;
return $this;
}
public function getStatutDeclaration(): ?bool
{
return $this->statutDeclaration;
}
public function setStatutDeclaration(?bool $statutDeclaration): self
{
$this->statutDeclaration = $statutDeclaration;
return $this;
}
public function getARepresentantLegal(): ?bool
{
return $this->aRepresentantLegal;
}
public function setARepresentantLegal(?bool $aRepresentantLegal): self
{
$this->aRepresentantLegal = $aRepresentantLegal;
return $this;
}
public function getLegalRepresentative(): ?Contact
{
return $this->legalRepresentative;
}
public function setLegalRepresentative(?Contact $legalRepresentative): self
{
$this->legalRepresentative = $legalRepresentative;
return $this;
}
public function getModaliteEnseignement(): ?string
{
return $this->modaliteEnseignement;
}
public function setModaliteEnseignement(?string $modaliteEnseignement): self
{
$this->modaliteEnseignement = $modaliteEnseignement;
return $this;
}
public function getDiplomant(): ?bool
{
return $this->diplomant;
}
public function setDiplomant(?bool $diplomant): self
{
$this->diplomant = $diplomant;
return $this;
}
public function getDelegueClasse(): ?bool
{
return $this->delegueClasse;
}
public function setDelegueClasse(?bool $delegueClasse): self
{
$this->delegueClasse = $delegueClasse;
return $this;
}
public function getEntrepriseContact(): ?Contact
{
return $this->entrepriseContact;
}
public function setEntrepriseContact(?Contact $entrepriseContact): self
{
$this->entrepriseContact = $entrepriseContact;
return $this;
}
public function isDiplomant(): ?bool
{
return $this->diplomant;
}
public function isARepresentantLegal(): ?bool
{
return $this->aRepresentantLegal;
}
/**
* @return Collection<int, Facturation>
*/
public function getFacturations(): Collection
{
return $this->facturations;
}
public function addFacturation(Facturation $facturation): static
{
if (!$this->facturations->contains($facturation)) {
$this->facturations->add($facturation);
$facturation->setDossier($this);
}
return $this;
}
public function removeFacturation(Facturation $facturation): static
{
// set the owning side to null (unless already changed)
if ($this->facturations->removeElement($facturation) && $facturation->getDossier() === $this) {
$facturation->setDossier(null);
}
return $this;
}
/**
* @return Etablissement|null
*/
public function getEtablissement(): ?Etablissement
{
return $this->etablissement;
}
/**
* @param Etablissement|null $etablissement
* @return Dossier
*/
public function setEtablissement(?Etablissement $etablissement): self
{
$this->etablissement = $etablissement;
return $this;
}
public function getFemmeEloigne(): ?bool
{
return $this->femmeEloigne;
}
public function setFemmeEloigne(?bool $femmeEloigne): self
{
$this->femmeEloigne = $femmeEloigne;
return $this;
}
public function getZrr(): ?bool
{
return $this->zrr;
}
public function setZrr(?bool $zrr): self
{
$this->zrr = $zrr;
return $this;
}
public function getQpv(): ?bool
{
return $this->qpv;
}
public function setQpv(?bool $qpv): self
{
$this->qpv = $qpv;
return $this;
}
public function isDelegueClasse(): ?bool
{
return $this->delegueClasse;
}
public function isStatutDeclaration(): ?bool
{
return $this->statutDeclaration;
}
public function isFemmeEloigne(): ?bool
{
return $this->femmeEloigne;
}
public function isZrr(): ?bool
{
return $this->zrr;
}
public function isQpv(): ?bool
{
return $this->qpv;
}
/**
* @throws \JsonException
*/
public function getPanier()
{
if ($this->panier === null) {
return [];
}
return json_decode($this->panier, true, 512, JSON_THROW_ON_ERROR);
}
public function setPanier(?string $panier): self
{
$this->panier = $panier;
return $this;
}
/**
* @throws \JsonException
*/
public function removePanier(int $panierId): self
{
$items = $this->getPanier();
if (array_key_exists($panierId, $items) === true) {
unset($items[$panierId]);
}
$this->panier = json_encode($items, JSON_THROW_ON_ERROR);
return $this;
}
public function clearsPanier(): self
{
$this->panier = NULL;
return $this;
}
/**
* @throws \JsonException
*/
public function addPanier(
?string $idEvent,
?int $idModule,
?string $intituleModule,
?string $codeModule,
?string $idSession,
?string $intituleSession,
?string $start,
?string $end,
?int $duree,
): self
{
$items = $this->getPanier();
$items[] = [
'id' => $idEvent,
'idModule' => $idModule,
'intitule_module' => $intituleModule,
'code_module' => $codeModule,
'id_session' => $idSession,
'intitule_session' => $intituleSession,
'start' => $start,
'end' => $end,
'duree' => $duree,
];
$this->panier = json_encode($items, JSON_THROW_ON_ERROR);
return $this;
}
}