src/Entity/Gestiform/Formations/Dossier/Dossier.php line 43

  1. <?php
  2. namespace App\Entity\Gestiform\Formations\Dossier;
  3. use DateTime;
  4. use Doctrine\DBAL\Types\Types;
  5. use JsonException;
  6. use App\Entity\AbstractEntity;
  7. use App\Entity\Common\Adresse;
  8. use App\Entity\Common\Convention;
  9. use App\Entity\Common\Document;
  10. use App\Entity\Common\HistoriqueEmail;
  11. use App\Entity\Common\Upload;
  12. use App\Entity\Gestiform\Admin\Cursus\CursusReponses;
  13. use App\Entity\Gestiform\Admin\Cursus\CVdynamique;
  14. use App\Entity\Gestiform\Admin\Cursus\Entretien;
  15. use App\Entity\Gestiform\Admin\Etablissement;
  16. use App\Entity\Gestiform\Admin\MasterListe\Masterlistelg;
  17. use App\Entity\Gestiform\Admin\Platforme;
  18. use App\Entity\Gestiform\Admin\Profil;
  19. use App\Entity\Gestiform\Admin\Site;
  20. use App\Entity\Gestiform\Admin\Societe;
  21. use App\Entity\Gestiform\Formations\Catalogue\Parcours\Parcours;
  22. use App\Entity\Gestiform\Formations\Devis\Devis;
  23. use App\Entity\Gestiform\Formations\Emargement\EmargementJustificatif;
  24. use App\Entity\Gestiform\Formations\Entreprise\Contact;
  25. use App\Entity\Gestiform\Formations\Entreprise\Entreprise;
  26. use App\Entity\Gestiform\Formations\Facturation\Facturation;
  27. use App\Entity\Gestiform\Formations\Financement\Financement;
  28. use App\Entity\Gestiform\Formations\Reglement\Reglement;
  29. use App\Entity\Gestiform\Formations\Reunion\ReunionDossier;
  30. use App\Entity\Gestiform\Formations\Session\Planning\Planning;
  31. use App\Entity\Gestiform\Formations\Session\Session;
  32. use App\Entity\Gestiform\Quiz\QuizReponse;
  33. use App\Entity\Gestiform\Users\Apprenant;
  34. use App\Entity\Gestiform\Users\Employe;
  35. use App\Entity\Gestiform\Users\HistoriqueChat;
  36. use App\Repository\Gestiform\Formations\Dossier\DossierRepository;
  37. use Doctrine\Common\Collections\ArrayCollection;
  38. use Doctrine\Common\Collections\Collection;
  39. use Doctrine\ORM\Mapping as ORM;
  40. #[ORM\Entity(repositoryClassDossierRepository::class)]
  41. class Dossier extends AbstractEntity
  42. {
  43.     #[ORM\Column(type'string'length255nullabletrue)]
  44.     private ?string $reference null;
  45.     #[ORM\Column(type'text'nullabletrue)]
  46.     private ?string $itemsDocument null;
  47.     #[ORM\Column(type'text'nullabletrue)]
  48.     private ?string $panier null;
  49.     #[ORM\Column(type'text'nullabletrue)]
  50.     private ?string $competences null;
  51.     #[ORM\Column(type'text'nullabletrue)]
  52.     private ?string $cart null;
  53.     #[ORM\Column(type'string'length255nullabletrue)]
  54.     private ?string $mode null;
  55.     #[ORM\Column(type'string'length255nullabletrue)]
  56.     private ?string $linkedin null;
  57.     #[ORM\Column(type'string'length255nullabletrue)]
  58.     private ?string $portfolio null;
  59.     #[ORM\Column(type'string'length255nullabletrue)]
  60.     private ?string $campus null;
  61.     #[ORM\Column(type'string'length255nullabletrue)]
  62.     private ?string $modaliteEnseignement null;
  63.     #[ORM\Column(type'string'length255nullabletrue)]
  64.     private ?string $commentaire null;
  65.     #[ORM\Column(type'string'length255nullabletrue)]
  66.     private ?string $emailCandidature null;
  67.     #[ORM\Column(type'datetime'nullabletrue)]
  68.     private ?DateTime $dateReunion null;
  69.     #[ORM\JoinColumn(nullabletrue)]
  70.     #[ORM\OneToOne(targetEntityUpload::class, cascade: ['persist''remove'])]
  71.     private ?Upload $stopProof null;
  72.     #[ORM\JoinColumn(nullabletrue)]
  73.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  74.     private ?Masterlistelg $stopCause null;
  75.     #[ORM\JoinColumn(nullabletrue)]
  76.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  77.     private ?Masterlistelg $stopType null;
  78.     #[ORM\Column(type'datetime'nullabletrue)]
  79.     private ?DateTime $stopDate null;
  80.     #[ORM\Column(type'boolean'nullabletrue)]
  81.     private ?bool $candidateAvailable false;
  82.     #[ORM\Column(type'boolean'nullabletrue)]
  83.     private ?bool $rncp false;
  84.     #[ORM\Column(type'boolean'nullabletrue)]
  85.     private ?bool $diplomant false;
  86.     #[ORM\Column(type'boolean'nullabletrue)]
  87.     private ?bool $delegueClasse false;
  88.     #[ORM\Column(type'boolean'nullabletrue)]
  89.     private ?bool $postulantAvailable false;
  90.     #[ORM\Column(type'boolean'nullabletrue)]
  91.     private ?bool $prospectAvailable false;
  92.     #[ORM\Column(type'boolean'nullabletrue)]
  93.     private ?bool $stagiaireAvailable false;
  94.     #[ORM\Column(type'boolean'nullabletrue)]
  95.     private ?bool $alumniAvailable false;
  96.     #[ORM\Column(type'boolean'nullabletrue)]
  97.     private ?bool $newsLetter false;
  98.     #[ORM\Column(type'boolean'nullabletrue)]
  99.     private ?bool $processed false;
  100.     #[ORM\Column(type'boolean'nullabletrue)]
  101.     private ?bool $statutDeclaration false;
  102.     #[ORM\Column(type'boolean'nullabletrue)]
  103.     private ?bool $aRepresentantLegal false;
  104.     #[ORM\Column(type'boolean'nullabletrue)]
  105.     private ?bool $notificationPaiement false;
  106.     #[ORM\Column(type'boolean'nullabletrue)]
  107.     private ?bool $engagementFormation false;
  108.     #[ORM\Column(type'boolean'nullabletrue)]
  109.     private ?bool $charteFormation false;
  110.     #[ORM\Column(type'boolean'nullabletrue)]
  111.     private ?bool $compteZoom false;
  112.     #[ORM\Column(type'boolean'nullabletrue)]
  113.     private ?bool $notified false;
  114.     #[ORM\Column(type'boolean'nullabletrue)]
  115.     private ?bool $femmeEloigne false;
  116.     #[ORM\Column(type'boolean'nullabletrue)]
  117.     private ?bool $zrr false;
  118.     #[ORM\Column(type'boolean'nullabletrue)]
  119.     private ?bool $qpv false;
  120.     #[ORM\Column(type'decimal'precision10scale2nullabletrue)]
  121.     private ?string $participationReglee null;
  122.     #[ORM\Column(type'decimal'precision10scale2nullabletrue)]
  123.     private ?string $participation null;
  124.     #[ORM\Column(type'decimal'precision10scale2nullabletrue)]
  125.     private ?string $caution null;
  126.     #[ORM\Column(type'decimal'precision10scale2nullabletrue)]
  127.     private ?string $resteaRegler null;
  128.     #[ORM\JoinColumn(nullabletrue)]
  129.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  130.     private ?Masterlistelg $typeActif null;
  131.     #[ORM\JoinColumn(nullabletrue)]
  132.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  133.     private ?Masterlistelg $state null;
  134.     #[ORM\JoinColumn(nullabletrue)]
  135.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  136.     private ?Masterlistelg $dispositif null;
  137.     #[ORM\JoinColumn(nullabletrue)]
  138.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  139.     private ?Masterlistelg $typeFormation null;
  140.     #[ORM\JoinColumn(nullabletrue)]
  141.     #[ORM\ManyToOne(targetEntityMasterlistelg::class)]
  142.     private ?Masterlistelg $resultat null;
  143.     #[ORM\JoinColumn(nullabletrue)]
  144.     #[ORM\ManyToOne(targetEntityProfil::class, cascade: ['persist'])]
  145.     private ?Profil $profil null;
  146.     #[ORM\JoinColumn(nullabletrue)]
  147.     #[ORM\ManyToOne(targetEntityPersonalInformations::class, cascade: ['persist'])]
  148.     private ?PersonalInformations $personalInformations null;
  149.     #[ORM\JoinColumn(nullabletrue)]
  150.     #[ORM\OneToOne(targetEntityAdresse::class, cascade: ['all'])]
  151.     private ?Adresse $adresse null;
  152.     #[ORM\JoinColumn(nullabletrue)]
  153.     #[ORM\OneToOne(inversedBy'dossier'targetEntityPlanning::class, cascade: ['persist'])]
  154.     private ?Planning $planning null;
  155.     #[ORM\JoinColumn(nullabletrue)]
  156.     #[ORM\ManyToOne(targetEntitySession::class, inversedBy'dossiers')]
  157.     private ?Session $session null;
  158.     #[ORM\JoinColumn(nullabletrue)]
  159.     #[ORM\ManyToOne(targetEntitySociete::class, inversedBy'dossiers')]
  160.     private ?Societe $societe null;
  161.     #[ORM\JoinColumn(nullabletrue)]
  162.     #[ORM\ManyToOne(targetEntitySite::class, inversedBy'dossiers')]
  163.     private ?Site $site null;
  164.     #[ORM\JoinColumn(nullabletrue)]
  165.     #[ORM\OneToOne(targetEntityDossierAnnexes::class, cascade: ['all'])]
  166.     private ?DossierAnnexes $dossierannexes null;
  167.     #[ORM\OneToMany(mappedBy'dossier'targetEntityDocument::class, cascade: ['persist'])]
  168.     private Collection $documents;
  169.     #[ORM\OneToMany(mappedBy'dossier'targetEntityHistoriqueEmail::class, cascade: ['persist'])]
  170.     private Collection $historiqueEmails;
  171.     #[ORM\OneToMany(mappedBy'dossier'targetEntityEmargementJustificatif::class, cascade: ['persist'])]
  172.     private Collection $justificatifs;
  173.     #[ORM\JoinColumn(nullabletrue)]
  174.     #[ORM\ManyToOne(targetEntityApprenant::class, cascade: ['persist'], inversedBy'dossiers')]
  175.     private ?Apprenant $apprenant null;
  176.     #[ORM\JoinColumn(nullabletrue)]
  177.     #[ORM\ManyToOne(targetEntityParcours::class, cascade: ['persist'])]
  178.     private ?Parcours $parcours null;
  179.     #[ORM\OneToMany(mappedBy'dossier'targetEntityCVdynamique::class, cascade: ['persist'])]
  180.     private Collection $cvDynamiques;
  181.     #[ORM\OneToMany(mappedBy'dossier'targetEntityEntretien::class, cascade: ['persist'])]
  182.     private Collection $entretiens;
  183.     #[ORM\OneToMany(mappedBy'dossier'targetEntityCursusReponses::class, cascade: ['persist'])]
  184.     private Collection $reponses;
  185.     #[ORM\OneToMany(mappedBy'dossier'targetEntityQuizReponse::class, cascade: ['persist'])]
  186.     private Collection $formulaireReponses;
  187.     #[ORM\OneToMany(mappedBy'dossier'targetEntityReunionDossier::class)]
  188.     private Collection $reunionDossiers;
  189.     #[ORM\OneToMany(mappedBy'dossier'targetEntityHistoriqueDossier::class, cascade: ['persist'])]
  190.     private Collection $historiqueDossiers;
  191.     #[ORM\OneToMany(mappedBy'dossier'targetEntityReglement::class, cascade: ['persist''remove'], orphanRemovaltrue)]
  192.     private Collection $reglements;
  193.     #[ORM\JoinColumn(nullabletrue)]
  194.     #[ORM\ManyToOne(targetEntityEmploye::class, inversedBy'dossierReorienters')]
  195.     private ?Employe $reorienter null;
  196.     #[ORM\JoinColumn(nullabletrue)]
  197.     #[ORM\ManyToOne(targetEntityEmploye::class, inversedBy'referentPedagogiques')]
  198.     private ?Employe $referentPedagogique null;
  199.     #[ORM\JoinColumn(nullabletrue)]
  200.     #[ORM\ManyToOne(targetEntityEmploye::class, inversedBy'referentCommercials')]
  201.     private ?Employe $referentCommercial null;
  202.     #[ORM\JoinColumn(nullabletrue)]
  203.     #[ORM\ManyToOne(targetEntityEmploye::class, inversedBy'referentCoachs')]
  204.     private ?Employe $referentCoach null;
  205.     #[ORM\JoinColumn(nullabletrue)]
  206.     #[ORM\ManyToOne(targetEntityEmploye::class, inversedBy'referentAdministratifs')]
  207.     private ?Employe $referentAdministratif null;
  208.     #[ORM\OneToMany(mappedBy'dossier'targetEntityConvention::class, cascade: ['persist'])]
  209.     private Collection $conventions;
  210.     #[ORM\OneToMany(mappedBy'dossier'targetEntityDevis::class, cascade: ['persist'])]
  211.     private Collection $deviss;
  212.     #[ORM\ManyToMany(targetEntityDevis::class, inversedBy'dossiers')]
  213.     private Collection $devisEntreprises;
  214.     #[ORM\ManyToOne(targetEntityEntreprise::class, inversedBy'dossiers')]
  215.     private ?Entreprise $entreprise null;
  216.     #[ORM\ManyToOne(targetEntityContact::class, inversedBy'dossiers')]
  217.     private ?Contact $entrepriseContact null;
  218.     #[ORM\JoinColumn(nullabletrue)]
  219.     #[ORM\OneToOne(targetEntityUpload::class, cascade: ['persist''remove'])]
  220.     private ?Upload $cv null;
  221.     #[ORM\OneToMany(mappedBy'dossier'targetEntityFinancement::class, cascade: ['persist'])]
  222.     private Collection $financements;
  223.     #[ORM\JoinColumn(nullabletrue)]
  224.     #[ORM\ManyToOne(targetEntityPlatforme::class, inversedBy'dossiers')]
  225.     private ?Platforme $platforme null;
  226.     #[ORM\OneToMany(mappedBy'dossier'targetEntityDossierQuiz::class, cascade: ['all'])]
  227.     private Collection $dossierQuizzs;
  228.     #[ORM\OneToMany(mappedBy'dossier'targetEntityHistoriqueComment::class, cascade: ['all'])]
  229.     private Collection $historiqueComments;
  230.     #[ORM\OneToMany(mappedBy'dossier'targetEntityHistoriqueChat::class, cascade: ['persist'])]
  231.     private Collection $historiqueChats;
  232.     #[ORM\OneToOne(mappedBy'dossier'targetEntityDiplome::class, cascade: ['persist'])]
  233.     private ?Diplome $diplome null;
  234.     #[ORM\OneToMany(mappedBy'dossier'targetEntityAvertissement::class, cascade: ['persist'])]
  235.     private Collection $avertissements;
  236.     #[ORM\JoinColumn(nullabletrue)]
  237.     #[ORM\ManyToOne(targetEntityContact::class, cascade: ['all'])]
  238.     private ?Contact $emergencyContact null;
  239.     #[ORM\JoinColumn(nullabletrue)]
  240.     #[ORM\ManyToOne(targetEntityContact::class, cascade: ['all'])]
  241.     private ?Contact $legalRepresentative null;
  242.     #[ORM\JoinColumn(nullabletrue)]
  243.     #[ORM\ManyToOne(targetEntityEtablissement::class, cascade: ['all'])]
  244.     private ?Etablissement $etablissement null;
  245.     #[ORM\OneToMany(mappedBy'dossier'targetEntityFacturation::class, cascade: ['persist'])]
  246.     private Collection $facturations;
  247.     public function __construct()
  248.     {
  249.         $this->documents = new ArrayCollection();
  250.         $this->historiqueEmails = new ArrayCollection();
  251.         $this->cvDynamiques = new ArrayCollection();
  252.         $this->entretiens = new ArrayCollection();
  253.         $this->reponses = new ArrayCollection();
  254.         $this->reglements = new ArrayCollection();
  255.         $this->historiqueDossiers = new ArrayCollection();
  256.         $this->conventions = new ArrayCollection();
  257.         $this->deviss = new ArrayCollection();
  258.         $this->devisEntreprises = new ArrayCollection();
  259.         $this->financements = new ArrayCollection();
  260.         $this->reunionDossiers = new ArrayCollection();
  261.         $this->dossierQuizzs = new ArrayCollection();
  262.         $this->historiqueComments = new ArrayCollection();
  263.         $this->historiqueChats = new ArrayCollection();
  264.         $this->justificatifs = new ArrayCollection();
  265.         $this->avertissements = new ArrayCollection();
  266.         $this->facturations = new ArrayCollection();
  267.         $this->formulaireReponses = new ArrayCollection();
  268.     }
  269.     public function getReference(): ?string
  270.     {
  271.         return $this->reference;
  272.     }
  273.     public function setReference(?string $reference): self
  274.     {
  275.         $this->reference $reference;
  276.         return $this;
  277.     }
  278.     public function getPlanningOrSessionPlanning(): ?Planning
  279.     {
  280.         return $this->planning ?? $this->getSession()?->getPlanning();
  281.     }
  282.     public function getPlanning(): ?Planning
  283.     {
  284.         return $this->planning;
  285.     }
  286.     public function setPlanning(?Planning $planning): self
  287.     {
  288.         $this->planning $planning;
  289.         return $this;
  290.     }
  291.     public function getSession(): ?Session
  292.     {
  293.         return $this->session;
  294.     }
  295.     public function setSession(?Session $session): self
  296.     {
  297.         $this->session $session;
  298.         return $this;
  299.     }
  300.     public function getCommentaire(): ?string
  301.     {
  302.         return $this->commentaire;
  303.     }
  304.     public function setCommentaire(?string $commentaire): self
  305.     {
  306.         $this->commentaire $commentaire;
  307.         return $this;
  308.     }
  309.     public function getMode(): ?string
  310.     {
  311.         return $this->mode;
  312.     }
  313.     public function setMode(?string $mode): self
  314.     {
  315.         $this->mode $mode;
  316.         return $this;
  317.     }
  318.     public function getCampus(): ?string
  319.     {
  320.         return $this->campus;
  321.     }
  322.     public function setCampus(?string $campus): self
  323.     {
  324.         $this->campus $campus;
  325.         return $this;
  326.     }
  327.     public function getDateReunion(): ?DateTime
  328.     {
  329.         return $this->dateReunion;
  330.     }
  331.     public function setDateReunion(?DateTime $dateReunion): self
  332.     {
  333.         $this->dateReunion $dateReunion;
  334.         return $this;
  335.     }
  336.     public function getEmailCandidature(): ?string
  337.     {
  338.         return $this->emailCandidature;
  339.     }
  340.     public function setEmailCandidature(?string $emailCandidature): self
  341.     {
  342.         $this->emailCandidature $emailCandidature;
  343.         return $this;
  344.     }
  345.     public function isNewsLetter(): ?bool
  346.     {
  347.         return $this->newsLetter;
  348.     }
  349.     public function setNewsLetter(?bool $newsLetter): self
  350.     {
  351.         $this->newsLetter $newsLetter;
  352.         return $this;
  353.     }
  354.     public function isProcessed(): ?bool
  355.     {
  356.         return $this->processed;
  357.     }
  358.     public function setProcessed(?bool $processed): self
  359.     {
  360.         $this->processed $processed;
  361.         return $this;
  362.     }
  363.     public function getTypeActif(): ?Masterlistelg
  364.     {
  365.         return $this->typeActif;
  366.     }
  367.     public function setTypeActif(?Masterlistelg $typeActif): self
  368.     {
  369.         $this->typeActif $typeActif;
  370.         return $this;
  371.     }
  372.     public function getState(): ?Masterlistelg
  373.     {
  374.         return $this->state;
  375.     }
  376.     public function setState(?Masterlistelg $state): self
  377.     {
  378.         $this->state $state;
  379.         return $this;
  380.     }
  381.     public function getDispositif(): ?Masterlistelg
  382.     {
  383.         return $this->dispositif;
  384.     }
  385.     public function setDispositif(?Masterlistelg $dispositif): self
  386.     {
  387.         $this->dispositif $dispositif;
  388.         return $this;
  389.     }
  390.     public function getProfil(): ?Profil
  391.     {
  392.         return $this->profil;
  393.     }
  394.     public function setProfil(?Profil $profil): self
  395.     {
  396.         $this->profil $profil;
  397.         return $this;
  398.     }
  399.     public function getPersonalInformations(): ?PersonalInformations
  400.     {
  401.         return $this->personalInformations;
  402.     }
  403.     public function setPersonalInformations(?PersonalInformations $personalInformations): self
  404.     {
  405.         $this->personalInformations $personalInformations;
  406.         return $this;
  407.     }
  408.     public function getAdresse(): ?Adresse
  409.     {
  410.         return $this->adresse;
  411.     }
  412.     public function setAdresse(?Adresse $adresse): self
  413.     {
  414.         $this->adresse $adresse;
  415.         return $this;
  416.     }
  417.     public function getDossierannexes(): ?DossierAnnexes
  418.     {
  419.         return $this->dossierannexes;
  420.     }
  421.     public function setDossierannexes(?DossierAnnexes $dossierannexes): self
  422.     {
  423.         $this->dossierannexes $dossierannexes;
  424.         return $this;
  425.     }
  426.     public function getTypeFormation(): ?Masterlistelg
  427.     {
  428.         return $this->typeFormation;
  429.     }
  430.     public function setTypeFormation(?Masterlistelg $typeFormation): self
  431.     {
  432.         $this->typeFormation $typeFormation;
  433.         return $this;
  434.     }
  435.     /**
  436.      * @return Collection<int, Document>
  437.      */
  438.     public function getDocuments(): Collection
  439.     {
  440.         return $this->documents;
  441.     }
  442.     public function addDocument(Document $document): self
  443.     {
  444.         if (!$this->documents->contains($document)) {
  445.             $this->documents->add($document);
  446.             $document->setDossier($this);
  447.         }
  448.         return $this;
  449.     }
  450.     public function removeDocument(Document $document): self
  451.     {
  452.         // set the owning side to null (unless already changed)
  453.         if ($this->documents->removeElement($document) && $document->getDossier() === $this) {
  454.             $document->setDossier(null);
  455.         }
  456.         return $this;
  457.     }
  458.     /**
  459.      * @return Collection<int, HistoriqueEmail>
  460.      */
  461.     public function getHistoriqueEmails(): Collection
  462.     {
  463.         return $this->historiqueEmails;
  464.     }
  465.     public function addHistoriqueEmail(HistoriqueEmail $historiqueEmail): self
  466.     {
  467.         if (!$this->historiqueEmails->contains($historiqueEmail)) {
  468.             $this->historiqueEmails->add($historiqueEmail);
  469.             $historiqueEmail->setDossier($this);
  470.         }
  471.         return $this;
  472.     }
  473.     public function removeHistoriqueEmail(HistoriqueEmail $historiqueEmail): self
  474.     {
  475.         // set the owning side to null (unless already changed)
  476.         if ($this->historiqueEmails->removeElement($historiqueEmail) && $historiqueEmail->getDossier() === $this) {
  477.             $historiqueEmail->setDossier(null);
  478.         }
  479.         return $this;
  480.     }
  481.     public function getApprenant(): ?Apprenant
  482.     {
  483.         return $this->apprenant;
  484.     }
  485.     public function setApprenant(?Apprenant $apprenant): self
  486.     {
  487.         $this->apprenant $apprenant;
  488.         return $this;
  489.     }
  490.     public function getParcours(): ?Parcours
  491.     {
  492.         return $this->parcours;
  493.     }
  494.     public function setParcours(?Parcours $parcours): self
  495.     {
  496.         $this->parcours $parcours;
  497.         return $this;
  498.     }
  499.     /**
  500.      * @return Collection<int, CVdynamique>
  501.      */
  502.     public function getCVDynamiques(): Collection
  503.     {
  504.         return $this->cvDynamiques;
  505.     }
  506.     public function addCVDynamique(CVdynamique $cvDynamique): self
  507.     {
  508.         if (!$this->cvDynamiques->contains($cvDynamique)) {
  509.             $this->cvDynamiques->add($cvDynamique);
  510.             $cvDynamique->setDossier($this);
  511.         }
  512.         return $this;
  513.     }
  514.     public function removeCVDynamique(CVdynamique $cVDynamique): self
  515.     {
  516.         // set the owning side to null (unless already changed)
  517.         if ($this->cvDynamiques->removeElement($cVDynamique) && $cVDynamique->getDossier() === $this) {
  518.             $cVDynamique->setDossier(null);
  519.         }
  520.         return $this;
  521.     }
  522.     public function addEntretien(Entretien $entretien): self
  523.     {
  524.         if (!$this->entretiens->contains($entretien)) {
  525.             $this->entretiens->add($entretien);
  526.             $entretien->setDossier($this);
  527.         }
  528.         return $this;
  529.     }
  530.     public function removeEntretien(Entretien $entretien): self
  531.     {
  532.         // set the owning side to null (unless already changed)
  533.         if ($this->entretiens->removeElement($entretien) && $entretien->getDossier() === $this) {
  534.             $entretien->setDossier(null);
  535.         }
  536.         return $this;
  537.     }
  538.     /**
  539.      * @return Collection<int, CursusReponses>
  540.      */
  541.     public function getCursusReponses(): Collection
  542.     {
  543.         return $this->reponses;
  544.     }
  545.     public function addCursusReponse(CursusReponses $reponse): self
  546.     {
  547.         if (!$this->reponses->contains($reponse)) {
  548.             $this->reponses->add($reponse);
  549.             $reponse->setDossier($this);
  550.         }
  551.         return $this;
  552.     }
  553.     public function removeCursusReponse(CursusReponses $reponse): self
  554.     {
  555.         // set the owning side to null (unless already changed)
  556.         if ($this->reponses->removeElement($reponse) && $reponse->getDossier() === $this) {
  557.             $reponse->setDossier(null);
  558.         }
  559.         return $this;
  560.     }
  561.     /**
  562.      * @return Collection<int, HistoriqueDossier>
  563.      */
  564.     public function getHistoriqueDossiers(): Collection
  565.     {
  566.         return $this->historiqueDossiers;
  567.     }
  568.     public function addHistoriqueDossier(HistoriqueDossier $historiqueDossier): self
  569.     {
  570.         if (!$this->historiqueDossiers->contains($historiqueDossier)) {
  571.             $this->historiqueDossiers->add($historiqueDossier);
  572.             $historiqueDossier->setDossier($this);
  573.         }
  574.         return $this;
  575.     }
  576.     public function removeHistoriqueDossier(HistoriqueDossier $historiqueDossier): self
  577.     {
  578.         // set the owning side to null (unless already changed)
  579.         if ($this->historiqueDossiers->removeElement($historiqueDossier) && $historiqueDossier->getDossier() === $this) {
  580.             $historiqueDossier->setDossier(null);
  581.         }
  582.         return $this;
  583.     }
  584.     public function getReorienter(): ?Employe
  585.     {
  586.         return $this->reorienter;
  587.     }
  588.     public function setReorienter(?Employe $reorienter): self
  589.     {
  590.         $this->reorienter $reorienter;
  591.         return $this;
  592.     }
  593.     /**
  594.      * @return Collection<int, Reglement>
  595.      */
  596.     public function getReglements(): Collection
  597.     {
  598.         return $this->reglements;
  599.     }
  600.     public function addReglement(Reglement $reglement): self
  601.     {
  602.         if (!$this->reglements->contains($reglement)) {
  603.             $this->reglements->add($reglement);
  604.             $reglement->setDossier($this);
  605.         }
  606.         return $this;
  607.     }
  608.     public function removeReglement(Reglement $reglement): self
  609.     {
  610.         // set the owning side to null (unless already changed)
  611.         if ($this->reglements->removeElement($reglement) && $reglement->getDossier() === $this) {
  612.             $reglement->setDossier(null);
  613.         }
  614.         return $this;
  615.     }
  616.     public function getParticipationReglee(): ?string
  617.     {
  618.         return $this->participationReglee;
  619.     }
  620.     public function setParticipationReglee(?string $participationReglee): self
  621.     {
  622.         $this->participationReglee $participationReglee;
  623.         return $this;
  624.     }
  625.     public function getParticipation(): ?string
  626.     {
  627.         return $this->participation;
  628.     }
  629.     public function setParticipation(?string $participation): self
  630.     {
  631.         $this->participation $participation;
  632.         return $this;
  633.     }
  634.     public function getCaution(): ?string
  635.     {
  636.         return $this->caution;
  637.     }
  638.     public function setCaution(?string $caution): self
  639.     {
  640.         $this->caution $caution;
  641.         return $this;
  642.     }
  643.     public function getResteaRegler(): ?string
  644.     {
  645.         return $this->resteaRegler;
  646.     }
  647.     public function setResteaRegler(?string $resteaRegler): self
  648.     {
  649.         $this->resteaRegler $resteaRegler;
  650.         return $this;
  651.     }
  652.     /**
  653.      * @return Collection<int, CursusReponses>
  654.      */
  655.     public function getReponses(): Collection
  656.     {
  657.         return $this->reponses;
  658.     }
  659.     public function addReponse(CursusReponses $reponse): self
  660.     {
  661.         if (!$this->reponses->contains($reponse)) {
  662.             $this->reponses->add($reponse);
  663.             $reponse->setDossier($this);
  664.         }
  665.         return $this;
  666.     }
  667.     public function removeReponse(CursusReponses $reponse): self
  668.     {
  669.         // set the owning side to null (unless already changed)
  670.         if ($this->reponses->removeElement($reponse) && $reponse->getDossier() === $this) {
  671.             $reponse->setDossier(null);
  672.         }
  673.         return $this;
  674.     }
  675.     public function getReferentPedagogique(): ?Employe
  676.     {
  677.         return $this->referentPedagogique;
  678.     }
  679.     public function setReferentPedagogique(?Employe $referentPedagogique): self
  680.     {
  681.         $this->referentPedagogique $referentPedagogique;
  682.         return $this;
  683.     }
  684.     public function getReferentCommercial(): ?Employe
  685.     {
  686.         return $this->referentCommercial;
  687.     }
  688.     public function setReferentCommercial(?Employe $referentCommercial): self
  689.     {
  690.         $this->referentCommercial $referentCommercial;
  691.         return $this;
  692.     }
  693.     public function getReferentCoach(): ?Employe
  694.     {
  695.         return $this->referentCoach;
  696.     }
  697.     public function setReferentCoach(?Employe $referentCoach): self
  698.     {
  699.         $this->referentCoach $referentCoach;
  700.         return $this;
  701.     }
  702.     public function getReferentAdministratif(): ?Employe
  703.     {
  704.         return $this->referentAdministratif;
  705.     }
  706.     public function setReferentAdministratif(?Employe $referentAdministratif): self
  707.     {
  708.         $this->referentAdministratif $referentAdministratif;
  709.         return $this;
  710.     }
  711.     /**
  712.      * @return Collection<int, Convention>
  713.      */
  714.     public function getConventions(): Collection
  715.     {
  716.         return $this->conventions;
  717.     }
  718.     public function addConvention(Convention $convention): self
  719.     {
  720.         if (!$this->conventions->contains($convention)) {
  721.             $this->conventions->add($convention);
  722.             $convention->setDossier($this);
  723.         }
  724.         return $this;
  725.     }
  726.     public function removeConvention(Convention $convention): self
  727.     {
  728.         // set the owning side to null (unless already changed)
  729.         if ($this->conventions->removeElement($convention) && $convention->getDossier() === $this) {
  730.             $convention->setDossier(null);
  731.         }
  732.         return $this;
  733.     }
  734.     public function getConvention($type): ?Convention
  735.     {
  736.         foreach ($this->conventions as $convention) {
  737.             if (
  738.                 ($convention->getState()?->getCode() === 'terminee' ||
  739.                     $convention->getState()?->getCode() === 'validee')
  740.                 && $convention->getType()?->getCode() === $type
  741.             ) {
  742.                 return $convention;
  743.             }
  744.         }
  745.         return null;
  746.     }
  747.     public function addDeviss(Devis $deviss): self
  748.     {
  749.         if (!$this->deviss->contains($deviss)) {
  750.             $this->deviss->add($deviss);
  751.             $deviss->setDossier($this);
  752.         }
  753.         return $this;
  754.     }
  755.     public function removeDeviss(Devis $deviss): self
  756.     {
  757.         // set the owning side to null (unless already changed)
  758.         if ($this->deviss->removeElement($deviss) && $deviss->getDossier() === $this) {
  759.             $deviss->setDossier(null);
  760.         }
  761.         return $this;
  762.     }
  763.     public function addDevisEntreprise(Devis $devisEntreprise): self
  764.     {
  765.         if (!$this->devisEntreprises->contains($devisEntreprise)) {
  766.             $this->devisEntreprises->add($devisEntreprise);
  767.         }
  768.         return $this;
  769.     }
  770.     public function removeDevisEntreprise(Devis $devisEntreprise): self
  771.     {
  772.         $this->devisEntreprises->removeElement($devisEntreprise);
  773.         return $this;
  774.     }
  775.     public function getEntreprise(): ?Entreprise
  776.     {
  777.         return $this->entreprise;
  778.     }
  779.     public function setEntreprise(?Entreprise $entreprise): self
  780.     {
  781.         $this->entreprise $entreprise;
  782.         return $this;
  783.     }
  784.     public function isCompteZoom(): ?bool
  785.     {
  786.         return $this->compteZoom;
  787.     }
  788.     public function setCompteZoom(?bool $compteZoom): self
  789.     {
  790.         $this->compteZoom $compteZoom;
  791.         return $this;
  792.     }
  793.     public function getCv(): ?Upload
  794.     {
  795.         return $this->cv;
  796.     }
  797.     public function setCv(?Upload $cv): self
  798.     {
  799.         $this->cv $cv;
  800.         return $this;
  801.     }
  802.     public function addFinancement(Financement $financement): self
  803.     {
  804.         if (!$this->financements->contains($financement)) {
  805.             $this->financements->add($financement);
  806.             $financement->setDossier($this);
  807.         }
  808.         return $this;
  809.     }
  810.     public function removeFinancement(Financement $financement): self
  811.     {
  812.         // set the owning side to null (unless already changed)
  813.         if ($this->financements->removeElement($financement) && $financement->getDossier() === $this) {
  814.             $financement->setDossier(null);
  815.         }
  816.         return $this;
  817.     }
  818.     public function getDetailFinancement(): array
  819.     {
  820.         $resultat = [];
  821.         $resultat['nbfinancements'] = 0;
  822.         $resultat['montantht'] = 0;
  823.         $resultat['montanttva'] = 0;
  824.         $resultat['montantttc'] = 0;
  825.         foreach ($this->getFinancements() as $ligne) {
  826.             $resultat['montantht'] += $ligne->getMontantHt();
  827.             $resultat['montanttva'] += $ligne->getMontantTva();
  828.             $resultat['montantttc'] += $ligne->getMontantTtc();
  829.             ++$resultat['nbfinancements'];
  830.         }
  831.         return $resultat;
  832.     }
  833.     /**
  834.      * @return Collection<int, Financement>
  835.      */
  836.     public function getFinancements(): Collection
  837.     {
  838.         return $this->financements;
  839.     }
  840.     public function getAllFrais(): float
  841.     {
  842.         $resultat 0;
  843.         if (!is_null($this->getDevisActif())) {
  844.             foreach ($this->getDevisActif()?->getDevisLignes() as $ligne) {
  845.                 if (!$ligne->isChargeHT()) {
  846.                     $resultat += $ligne->getMontantHT();
  847.                 }
  848.             }
  849.         }
  850.         return $resultat;
  851.     }
  852.     public function getDevisActif(): Devis|null
  853.     {
  854.         $devis null;
  855.         foreach ($this->getDeviss() as $l) {
  856.             if (!is_null($l->getState()) && $l->getState()?->getCode() === 'accord') {
  857.                 $devis $l;
  858.             }
  859.         }
  860.         if (!is_null($this->getDevisEntreprises())) {
  861.             foreach ($this->getDevisEntreprises() as $l2) {
  862.                 if (!is_null($l2->getState()) && $l2->getState()?->getCode() === 'accord') {
  863.                     $devis $l2;
  864.                 }
  865.             }
  866.         }
  867.         return $devis;
  868.     }
  869.     /**
  870.      * @return Collection<int, Devis>
  871.      */
  872.     public function getDeviss(): Collection
  873.     {
  874.         return $this->deviss;
  875.     }
  876.     /**
  877.      * @return Collection<int, Devis>
  878.      */
  879.     public function getDevisEntreprises(): Collection
  880.     {
  881.         return $this->devisEntreprises;
  882.     }
  883.     public function isNotificationPaiement(): ?bool
  884.     {
  885.         return $this->notificationPaiement;
  886.     }
  887.     public function setNotificationPaiement(?bool $notificationPaiement): self
  888.     {
  889.         $this->notificationPaiement $notificationPaiement;
  890.         return $this;
  891.     }
  892.     public function getPlatforme(): ?Platforme
  893.     {
  894.         return $this->platforme;
  895.     }
  896.     public function setPlatforme(?Platforme $platforme): self
  897.     {
  898.         $this->platforme $platforme;
  899.         return $this;
  900.     }
  901.     public function getEntretienActif()
  902.     {
  903.         if ($this->getEntretiens()->first()) {
  904.             return $this->getEntretiens()->first();
  905.         }
  906.         return null;
  907.     }
  908.     /**
  909.      * @return Collection<int, Entretien>
  910.      */
  911.     public function getEntretiens(): Collection
  912.     {
  913.         return $this->entretiens;
  914.     }
  915.     /**
  916.      * @return Collection<int, ReunionDossier>
  917.      */
  918.     public function getReunionDossiers(): Collection
  919.     {
  920.         return $this->reunionDossiers;
  921.     }
  922.     public function addReunionDossier(ReunionDossier $reunionDossier): self
  923.     {
  924.         if (!$this->reunionDossiers->contains($reunionDossier)) {
  925.             $this->reunionDossiers->add($reunionDossier);
  926.             $reunionDossier->setDossier($this);
  927.         }
  928.         return $this;
  929.     }
  930.     public function removeReunionDossier(ReunionDossier $reunionDossier): self
  931.     {
  932.         // set the owning side to null (unless already changed)
  933.         if ($this->reunionDossiers->removeElement($reunionDossier) && $reunionDossier->getDossier() === $this) {
  934.             $reunionDossier->setDossier(null);
  935.         }
  936.         return $this;
  937.     }
  938.     public function isCandidateAvailable(): ?bool
  939.     {
  940.         return $this->candidateAvailable;
  941.     }
  942.     public function setCandidateAvailable(?bool $candidateAvailable): self
  943.     {
  944.         $this->candidateAvailable $candidateAvailable;
  945.         return $this;
  946.     }
  947.     public function isPostulantAvailable(): ?bool
  948.     {
  949.         return $this->postulantAvailable;
  950.     }
  951.     public function setPostulantAvailable(?bool $postulantAvailable): self
  952.     {
  953.         $this->postulantAvailable $postulantAvailable;
  954.         return $this;
  955.     }
  956.     public function isProspectAvailable(): ?bool
  957.     {
  958.         return $this->prospectAvailable;
  959.     }
  960.     public function setProspectAvailable(?bool $prospectAvailable): self
  961.     {
  962.         $this->prospectAvailable $prospectAvailable;
  963.         return $this;
  964.     }
  965.     public function isStagiaireAvailable(): ?bool
  966.     {
  967.         return $this->stagiaireAvailable;
  968.     }
  969.     public function setStagiaireAvailable(?bool $stagiaireAvailable): self
  970.     {
  971.         $this->stagiaireAvailable $stagiaireAvailable;
  972.         return $this;
  973.     }
  974.     public function isAlumniAvailable(): ?bool
  975.     {
  976.         return $this->alumniAvailable;
  977.     }
  978.     public function setAlumniAvailable(?bool $alumniAvailable): self
  979.     {
  980.         $this->alumniAvailable $alumniAvailable;
  981.         return $this;
  982.     }
  983.     /**
  984.      * @throws JsonException
  985.      */
  986.     public function addItemsDocument(string $intitulestring $urltemplate$type): self
  987.     {
  988.         $exit false;
  989.         $items $this->getItemsDocument();
  990.         foreach ($items as $item) {
  991.             if ($item['intitule'] === $intitule) {
  992.                 $exit true;
  993.             }
  994.         }
  995.         if (!$exit) {
  996.             $items[] = [
  997.                 'intitule' => $intitule,
  998.                 'urltemplate' => $urltemplate,
  999.                 'type' => $type
  1000.             ];
  1001.         }
  1002.         $this->itemsDocument json_encode($itemsJSON_THROW_ON_ERROR);
  1003.         return $this;
  1004.     }
  1005.     /**
  1006.      * @throws JsonException
  1007.      */
  1008.     public function getItemsDocument()
  1009.     {
  1010.         if ($this->itemsDocument === null) {
  1011.             return [];
  1012.         }
  1013.         return json_decode($this->itemsDocumenttrue512JSON_THROW_ON_ERROR);
  1014.     }
  1015.     public function setItemsDocument(?string $itemsDocument): self
  1016.     {
  1017.         $this->itemsDocument $itemsDocument;
  1018.         return $this;
  1019.     }
  1020.     /**
  1021.      * @throws JsonException
  1022.      */
  1023.     public function removeItemDocument(int $templateId): self
  1024.     {
  1025.         $items $this->getItemsDocument();
  1026.         if (array_key_exists($templateId$items)) {
  1027.             unset($items[$templateId]);
  1028.         }
  1029.         $this->itemsDocument json_encode($itemsJSON_THROW_ON_ERROR);
  1030.         return $this;
  1031.     }
  1032.     public function removeItemsDocument(): self
  1033.     {
  1034.         $this->itemsDocument NULL;
  1035.         return $this;
  1036.     }
  1037.     public function isEngagementFormation(): ?bool
  1038.     {
  1039.         return $this->engagementFormation;
  1040.     }
  1041.     public function setEngagementFormation(?bool $engagementFormation): self
  1042.     {
  1043.         $this->engagementFormation $engagementFormation;
  1044.         return $this;
  1045.     }
  1046.     public function isCharteFormation(): ?bool
  1047.     {
  1048.         return $this->charteFormation;
  1049.     }
  1050.     public function setCharteFormation(?bool $charteFormation): self
  1051.     {
  1052.         $this->charteFormation $charteFormation;
  1053.         return $this;
  1054.     }
  1055.     public function getSociete(): ?Societe
  1056.     {
  1057.         return $this->societe;
  1058.     }
  1059.     public function setSociete(?Societe $societe): self
  1060.     {
  1061.         $this->societe $societe;
  1062.         return $this;
  1063.     }
  1064.     public function getSite(): ?Site
  1065.     {
  1066.         return $this->site;
  1067.     }
  1068.     public function setSite(?Site $site): self
  1069.     {
  1070.         $this->site $site;
  1071.         return $this;
  1072.     }
  1073.     /**
  1074.      * @return Collection<int, DossierQuiz>
  1075.      */
  1076.     public function getDossierQuizzs(): Collection
  1077.     {
  1078.         return $this->dossierQuizzs;
  1079.     }
  1080.     public function setDossierQuizzes(Collection $quizzes): self
  1081.     {
  1082.         $this->dossierQuizzs $quizzes;
  1083.         return $this;
  1084.     }
  1085.     public function addDossierQuizz(DossierQuiz $dossierQuizz): self
  1086.     {
  1087.         if (!$this->dossierQuizzs->contains($dossierQuizz)) {
  1088.             $this->dossierQuizzs->add($dossierQuizz);
  1089.             $dossierQuizz->setDossier($this);
  1090.         }
  1091.         return $this;
  1092.     }
  1093.     public function removeDossierQuizz(DossierQuiz $dossierQuizz): self
  1094.     {
  1095.         // set the owning side to null (unless already changed)
  1096.         if ($this->dossierQuizzs->removeElement($dossierQuizz) && $dossierQuizz->getDossier() === $this) {
  1097.             $dossierQuizz->setDossier(null);
  1098.         }
  1099.         return $this;
  1100.     }
  1101.     /**
  1102.      * @return Collection<int, HistoriqueComment>
  1103.      */
  1104.     public function getHistoriqueComments(): Collection
  1105.     {
  1106.         return $this->historiqueComments;
  1107.     }
  1108.     public function addHistoriqueComment(HistoriqueComment $historiqueComment): self
  1109.     {
  1110.         if (!$this->historiqueComments->contains($historiqueComment)) {
  1111.             $this->historiqueComments->add($historiqueComment);
  1112.             $historiqueComment->setDossier($this);
  1113.         }
  1114.         return $this;
  1115.     }
  1116.     public function removeHistoriqueComment(HistoriqueComment $historiqueComment): self
  1117.     {
  1118.         // set the owning side to null (unless already changed)
  1119.         if ($this->historiqueComments->removeElement($historiqueComment) && $historiqueComment->getDossier() === $this) {
  1120.             $historiqueComment->setDossier(null);
  1121.         }
  1122.         return $this;
  1123.     }
  1124.     /**
  1125.      * @return Collection<int, HistoriqueChat>
  1126.      */
  1127.     public function getHistoriqueChats(): Collection
  1128.     {
  1129.         return $this->historiqueChats;
  1130.     }
  1131.     public function addHistoriqueChat(HistoriqueChat $historiqueChat): self
  1132.     {
  1133.         if (!$this->historiqueChats->contains($historiqueChat)) {
  1134.             $this->historiqueChats->add($historiqueChat);
  1135.             $historiqueChat->setDossier($this);
  1136.         }
  1137.         return $this;
  1138.     }
  1139.     public function removeHistoriqueChat(HistoriqueChat $historiqueChat): self
  1140.     {
  1141.         // set the owning side to null (unless already changed)
  1142.         if ($this->historiqueChats->removeElement($historiqueChat) && $historiqueChat->getDossier() === $this) {
  1143.             $historiqueChat->setDossier(null);
  1144.         }
  1145.         return $this;
  1146.     }
  1147.     public function isNotified(): ?bool
  1148.     {
  1149.         return $this->notified;
  1150.     }
  1151.     public function setNotified(?bool $notified): self
  1152.     {
  1153.         $this->notified $notified;
  1154.         return $this;
  1155.     }
  1156.     /**
  1157.      * @return Collection<int, EmargementJustificatif>
  1158.      */
  1159.     public function getJustificatifs(): Collection
  1160.     {
  1161.         return $this->justificatifs;
  1162.     }
  1163.     public function addJustificatif(EmargementJustificatif $justificatif): self
  1164.     {
  1165.         if (!$this->justificatifs->contains($justificatif)) {
  1166.             $this->justificatifs->add($justificatif);
  1167.             $justificatif->setDossier($this);
  1168.         }
  1169.         return $this;
  1170.     }
  1171.     public function removeJustificatif(EmargementJustificatif $justificatif): self
  1172.     {
  1173.         // set the owning side to null (unless already changed)
  1174.         if ($this->justificatifs->removeElement($justificatif) && $justificatif->getDossier() === $this) {
  1175.             $justificatif->setDossier(null);
  1176.         }
  1177.         return $this;
  1178.     }
  1179.     public function isRncp(): ?bool
  1180.     {
  1181.         return $this->rncp;
  1182.     }
  1183.     public function setRncp(?bool $rncp): self
  1184.     {
  1185.         $this->rncp $rncp;
  1186.         return $this;
  1187.     }
  1188.     public function getDiplome(): ?Diplome
  1189.     {
  1190.         return $this->diplome;
  1191.     }
  1192.     public function setDiplome(?Diplome $diplome): Dossier
  1193.     {
  1194.         $this->diplome $diplome;
  1195.         return $this;
  1196.     }
  1197.     /**
  1198.      * @throws JsonException
  1199.      */
  1200.     public function addCart(string $idModulestring $intitule): self
  1201.     {
  1202.         $exit false;
  1203.         $items $this->getCart();
  1204.         foreach ($items as $item) {
  1205.             if ($item['id'] === $idModule) {
  1206.                 $exit true;
  1207.             }
  1208.         }
  1209.         if (!$exit) {
  1210.             $items[] = [
  1211.                 'id' => $idModule,
  1212.                 'intitule' => $intitule,
  1213.             ];
  1214.         }
  1215.         $this->cart json_encode($itemsJSON_THROW_ON_ERROR);
  1216.         return $this;
  1217.     }
  1218.     public function getCart()
  1219.     {
  1220.         if ($this->cart === null) {
  1221.             return [];
  1222.         }
  1223.         return json_decode($this->carttrue512JSON_THROW_ON_ERROR);
  1224.     }
  1225.     public function setCart(?string $cart): self
  1226.     {
  1227.         $this->cart $cart;
  1228.         return $this;
  1229.     }
  1230.     /**
  1231.      * @throws JsonException
  1232.      */
  1233.     public function removeCart(int $idModule): self
  1234.     {
  1235.         $items $this->getCart();
  1236.         if (array_key_exists($idModule$items)) {
  1237.             unset($items[$idModule]);
  1238.         }
  1239.         $this->cart json_encode($itemsJSON_THROW_ON_ERROR);
  1240.         return $this;
  1241.     }
  1242.     public function removeCarts(): self
  1243.     {
  1244.         $this->cart NULL;
  1245.         return $this;
  1246.     }
  1247.     public function getResultat(): ?Masterlistelg
  1248.     {
  1249.         return $this->resultat;
  1250.     }
  1251.     public function setResultat(?Masterlistelg $resultat): self
  1252.     {
  1253.         $this->resultat $resultat;
  1254.         return $this;
  1255.     }
  1256.     public function getStopProof(): ?Upload
  1257.     {
  1258.         return $this->stopProof;
  1259.     }
  1260.     public function setStopProof(?Upload $stopProof): self
  1261.     {
  1262.         $this->stopProof $stopProof;
  1263.         return $this;
  1264.     }
  1265.     public function getStopCause(): ?Masterlistelg
  1266.     {
  1267.         return $this->stopCause;
  1268.     }
  1269.     public function setStopCause(?Masterlistelg $stopCause): self
  1270.     {
  1271.         $this->stopCause $stopCause;
  1272.         return $this;
  1273.     }
  1274.     public function getStopType(): ?Masterlistelg
  1275.     {
  1276.         return $this->stopType;
  1277.     }
  1278.     public function setStopType(?Masterlistelg $stopType): self
  1279.     {
  1280.         $this->stopType $stopType;
  1281.         return $this;
  1282.     }
  1283.     public function getStopDate(): ?DateTime
  1284.     {
  1285.         return $this->stopDate;
  1286.     }
  1287.     public function setStopDate(?DateTime $stopDate): self
  1288.     {
  1289.         $this->stopDate $stopDate;
  1290.         return $this;
  1291.     }
  1292.     public function &getCompetenceById(int $blocIdint $id): ?array
  1293.     {
  1294.         $blocsCompetences $this->getCompetences();
  1295.         return $blocsCompetences[$blocId]['competences'][$id];
  1296.     }
  1297.     public function getCompetences(): array
  1298.     {
  1299.         return $this->competences json_decode($this->competencestrue) : [];
  1300.     }
  1301.     public function setCompetences(array $competences): self
  1302.     {
  1303.         $this->competences json_encode($competences);
  1304.         return $this;
  1305.     }
  1306.     public function addCompetence(int $blocIdstring $intituleBlocint $idstring $intitulestring $resultstring $commentaire): self
  1307.     {
  1308.         // Décodez les compétences existantes
  1309.         $blocsCompetences $this->getCompetences();
  1310.         // Si le bloc n'existe pas encore, initialisez-le
  1311.         if (!isset($blocsCompetences[$blocId])) {
  1312.             $blocsCompetences[$blocId] = [
  1313.                 'intitule' => $intituleBloc,
  1314.                 'evaluation' => 0,
  1315.                 'id' => $blocId,
  1316.                 'competences' => []
  1317.             ];
  1318.         }
  1319.         // Référence au tableau de compétences du bloc
  1320.         $competences = &$blocsCompetences[$blocId]['competences'];
  1321.         // Mise Ã  jour ou ajout de la compétence
  1322.         $found false;
  1323.         foreach ($competences as &$competence) {
  1324.             if ($competence['id'] == $id) {
  1325.                 $competence['intitule'] = $intitule;
  1326.                 $found true;
  1327.                 break;
  1328.             }
  1329.         }
  1330.         if (!$found) {
  1331.             $competences[$id] = [
  1332.                 'id' => $id,
  1333.                 'intitule' => $intitule,
  1334.                 'result' => $result,
  1335.                 'commentaire' => $commentaire
  1336.             ];
  1337.         }
  1338.         // Encodez les données mises Ã  jour
  1339.         $this->competences json_encode($blocsCompetencesJSON_THROW_ON_ERROR);
  1340.         return $this;
  1341.     }
  1342.     public function editCompetence(int $blocIdstring $intituleBlocint $idstring $intitulestring $resultstring $commentaire): self
  1343.     {
  1344.         // Décodez les compétences existantes
  1345.         $blocsCompetences $this->getCompetences();
  1346.         // Si le bloc n'existe pas encore, initialisez-le
  1347.         if (!isset($blocsCompetences[$blocId])) {
  1348.             $blocsCompetences[$blocId] = [
  1349.                 'evaluation' => 0,
  1350.                 'intitule' => $intituleBloc,
  1351.                 'competences' => []
  1352.             ];
  1353.         }
  1354.         // Référence au tableau de compétences du bloc
  1355.         $competences = &$blocsCompetences[$blocId]['competences'];
  1356.         // Mise Ã  jour ou ajout de la compétence
  1357.         $found false;
  1358.         foreach ($competences as &$competence) {
  1359.             if ($competence['id'] === $id) {
  1360.                 $competence['result'] = $result;
  1361.                 $competence['commentaire'] = $commentaire;
  1362.                 $found true;
  1363.                 break;
  1364.             }
  1365.         }
  1366.         if (!$found) {
  1367.             $competences[$id] = [
  1368.                 'id' => $id,
  1369.                 'intitule' => $intitule,
  1370.                 'result' => $result,
  1371.                 'commentaire' => $commentaire
  1372.             ];
  1373.         }
  1374.         // Encodez les données mises Ã  jour
  1375.         $this->competences json_encode($blocsCompetencesJSON_THROW_ON_ERROR);
  1376.         return $this;
  1377.     }
  1378.     public function updateBlocEvaluation(int $blocIdint $evaluation): self
  1379.     {
  1380.         $blocsCompetences $this->getCompetences();
  1381.         if (isset($blocsCompetences[$blocId])) {
  1382.             $blocsCompetences[$blocId]['evaluation'] = $evaluation;
  1383.             $this->setCompetences($blocsCompetences);
  1384.         }
  1385.         return $this;
  1386.     }
  1387.     public function getBlocEvaluation(int $blocId): int
  1388.     {
  1389.         $blocsCompetences $this->getCompetences();
  1390.         return $blocsCompetences[$blocId]['evaluation'] ?? 0;
  1391.     }
  1392.     public function removeCompetence(int $blocIdint $id): self
  1393.     {
  1394.         $blocsCompetences $this->getCompetences();
  1395.         if (isset($blocsCompetences[$blocId])) {
  1396.             $competences = &$blocsCompetences[$blocId]['competences'];
  1397.             foreach ($competences as $key => $competence) {
  1398.                 if ($competence['id'] === $id) {
  1399.                     unset($competences[$key]);
  1400.                     $blocsCompetences[$blocId]['competences'] = array_values($competences);
  1401.                     $this->setCompetences($blocsCompetences);
  1402.                     break;
  1403.                 }
  1404.             }
  1405.         }
  1406.         return $this;
  1407.     }
  1408.     public function clearCompetences(): self
  1409.     {
  1410.         $this->competences null;
  1411.         return $this;
  1412.     }
  1413.     /**
  1414.      * @return Collection<int, Avertissement>
  1415.      */
  1416.     public function getAvertissements(): Collection
  1417.     {
  1418.         return $this->avertissements;
  1419.     }
  1420.     public function addAvertissement(Avertissement $avertissement): self
  1421.     {
  1422.         if (!$this->avertissements->contains($avertissement)) {
  1423.             $this->avertissements->add($avertissement);
  1424.             $avertissement->setDossier($this);
  1425.         }
  1426.         return $this;
  1427.     }
  1428.     public function removeAvertissement(Avertissement $avertissement): self
  1429.     {
  1430.         // set the owning side to null (unless already changed)
  1431.         if ($this->avertissements->removeElement($avertissement) && $avertissement->getDossier() === $this) {
  1432.             $avertissement->setDossier(null);
  1433.         }
  1434.         return $this;
  1435.     }
  1436.     public function getLinkedin(): ?string
  1437.     {
  1438.         return $this->linkedin;
  1439.     }
  1440.     public function setLinkedin(?string $linkedin): self
  1441.     {
  1442.         $this->linkedin $linkedin;
  1443.         return $this;
  1444.     }
  1445.     public function getPortfolio(): ?string
  1446.     {
  1447.         return $this->portfolio;
  1448.     }
  1449.     public function setPortfolio(?string $portfolio): self
  1450.     {
  1451.         $this->portfolio $portfolio;
  1452.         return $this;
  1453.     }
  1454.     public function getEmergencyContact(): ?Contact
  1455.     {
  1456.         return $this->emergencyContact;
  1457.     }
  1458.     public function setEmergencyContact(?Contact $emergencyContact): self
  1459.     {
  1460.         $this->emergencyContact $emergencyContact;
  1461.         return $this;
  1462.     }
  1463.     public function getStatutDeclaration(): ?bool
  1464.     {
  1465.         return $this->statutDeclaration;
  1466.     }
  1467.     public function setStatutDeclaration(?bool $statutDeclaration): self
  1468.     {
  1469.         $this->statutDeclaration $statutDeclaration;
  1470.         return $this;
  1471.     }
  1472.     public function getARepresentantLegal(): ?bool
  1473.     {
  1474.         return $this->aRepresentantLegal;
  1475.     }
  1476.     public function setARepresentantLegal(?bool $aRepresentantLegal): self
  1477.     {
  1478.         $this->aRepresentantLegal $aRepresentantLegal;
  1479.         return $this;
  1480.     }
  1481.     public function getLegalRepresentative(): ?Contact
  1482.     {
  1483.         return $this->legalRepresentative;
  1484.     }
  1485.     public function setLegalRepresentative(?Contact $legalRepresentative): self
  1486.     {
  1487.         $this->legalRepresentative $legalRepresentative;
  1488.         return $this;
  1489.     }
  1490.     public function getModaliteEnseignement(): ?string
  1491.     {
  1492.         return $this->modaliteEnseignement;
  1493.     }
  1494.     public function setModaliteEnseignement(?string $modaliteEnseignement): self
  1495.     {
  1496.         $this->modaliteEnseignement $modaliteEnseignement;
  1497.         return $this;
  1498.     }
  1499.     public function getDiplomant(): ?bool
  1500.     {
  1501.         return $this->diplomant;
  1502.     }
  1503.     public function setDiplomant(?bool $diplomant): self
  1504.     {
  1505.         $this->diplomant $diplomant;
  1506.         return $this;
  1507.     }
  1508.     public function getDelegueClasse(): ?bool
  1509.     {
  1510.         return $this->delegueClasse;
  1511.     }
  1512.     public function setDelegueClasse(?bool $delegueClasse): self
  1513.     {
  1514.         $this->delegueClasse $delegueClasse;
  1515.         return $this;
  1516.     }
  1517.     public function getEntrepriseContact(): ?Contact
  1518.     {
  1519.         return $this->entrepriseContact;
  1520.     }
  1521.     public function setEntrepriseContact(?Contact $entrepriseContact): self
  1522.     {
  1523.         $this->entrepriseContact $entrepriseContact;
  1524.         return $this;
  1525.     }
  1526.     public function isDiplomant(): ?bool
  1527.     {
  1528.         return $this->diplomant;
  1529.     }
  1530.     public function isARepresentantLegal(): ?bool
  1531.     {
  1532.         return $this->aRepresentantLegal;
  1533.     }
  1534.     /**
  1535.      * @return Collection<int, Facturation>
  1536.      */
  1537.     public function getFacturations(): Collection
  1538.     {
  1539.         return $this->facturations;
  1540.     }
  1541.     public function addFacturation(Facturation $facturation): self
  1542.     {
  1543.         if (!$this->facturations->contains($facturation)) {
  1544.             $this->facturations->add($facturation);
  1545.             $facturation->setDossier($this);
  1546.         }
  1547.         return $this;
  1548.     }
  1549.     public function removeFacturation(Facturation $facturation): self
  1550.     {
  1551.         // set the owning side to null (unless already changed)
  1552.         if ($this->facturations->removeElement($facturation) && $facturation->getDossier() === $this) {
  1553.             $facturation->setDossier(null);
  1554.         }
  1555.         return $this;
  1556.     }
  1557.     public function getEtablissement(): ?Etablissement
  1558.     {
  1559.         return $this->etablissement;
  1560.     }
  1561.     public function setEtablissement(?Etablissement $etablissement): self
  1562.     {
  1563.         $this->etablissement $etablissement;
  1564.         return $this;
  1565.     }
  1566.     public function getFemmeEloigne(): ?bool
  1567.     {
  1568.         return $this->femmeEloigne;
  1569.     }
  1570.     public function setFemmeEloigne(?bool $femmeEloigne): self
  1571.     {
  1572.         $this->femmeEloigne $femmeEloigne;
  1573.         return $this;
  1574.     }
  1575.     public function getZrr(): ?bool
  1576.     {
  1577.         return $this->zrr;
  1578.     }
  1579.     public function setZrr(?bool $zrr): self
  1580.     {
  1581.         $this->zrr $zrr;
  1582.         return $this;
  1583.     }
  1584.     public function getQpv(): ?bool
  1585.     {
  1586.         return $this->qpv;
  1587.     }
  1588.     public function setQpv(?bool $qpv): self
  1589.     {
  1590.         $this->qpv $qpv;
  1591.         return $this;
  1592.     }
  1593.     public function isDelegueClasse(): ?bool
  1594.     {
  1595.         return $this->delegueClasse;
  1596.     }
  1597.     public function isStatutDeclaration(): ?bool
  1598.     {
  1599.         return $this->statutDeclaration;
  1600.     }
  1601.     public function isFemmeEloigne(): ?bool
  1602.     {
  1603.         return $this->femmeEloigne;
  1604.     }
  1605.     public function isZrr(): ?bool
  1606.     {
  1607.         return $this->zrr;
  1608.     }
  1609.     public function isQpv(): ?bool
  1610.     {
  1611.         return $this->qpv;
  1612.     }
  1613.     /**
  1614.      * @throws JsonException
  1615.      */
  1616.     public function getPanier()
  1617.     {
  1618.         if ($this->panier === null) {
  1619.             return [];
  1620.         }
  1621.         return json_decode($this->paniertrue512JSON_THROW_ON_ERROR);
  1622.     }
  1623.     public function setPanier(?string $panier): self
  1624.     {
  1625.         $this->panier $panier;
  1626.         return $this;
  1627.     }
  1628.     /**
  1629.      * @throws JsonException
  1630.      */
  1631.     public function removePanier(int $panierId): self
  1632.     {
  1633.         $items $this->getPanier();
  1634.         if (array_key_exists($panierId$items)) {
  1635.             unset($items[$panierId]);
  1636.         }
  1637.         $this->panier json_encode($itemsJSON_THROW_ON_ERROR);
  1638.         return $this;
  1639.     }
  1640.     public function clearsPanier(): self
  1641.     {
  1642.         $this->panier NULL;
  1643.         return $this;
  1644.     }
  1645.     /**
  1646.      * @throws JsonException
  1647.      */
  1648.     public function addPanier(
  1649.         ?string $idEvent,
  1650.         ?int $idModule,
  1651.         ?string $intituleModule,
  1652.         ?string $codeModule,
  1653.         ?string $idSession,
  1654.         ?string $intituleSession,
  1655.         ?string $start,
  1656.         ?string $end,
  1657.         ?int    $duree,
  1658.     ): self
  1659.     {
  1660.         $items $this->getPanier();
  1661.         $items[] = [
  1662.             'id' => $idEvent,
  1663.             'idModule' => $idModule,
  1664.             'intitule_module' => $intituleModule,
  1665.             'code_module' => $codeModule,
  1666.             'id_session' => $idSession,
  1667.             'intitule_session' => $intituleSession,
  1668.             'start' => $start,
  1669.             'end' => $end,
  1670.             'duree' => $duree,
  1671.         ];
  1672.         $this->panier json_encode($itemsJSON_THROW_ON_ERROR);
  1673.         return $this;
  1674.     }
  1675.     /**
  1676.      * @return Collection<int, QuizReponse>
  1677.      */
  1678.     public function getFormulaireReponses(): Collection
  1679.     {
  1680.         return $this->formulaireReponses;
  1681.     }
  1682.     public function addFormulaireReponse(QuizReponse $formulaireReponse): self
  1683.     {
  1684.         if (!$this->formulaireReponses->contains($formulaireReponse)) {
  1685.             $this->formulaireReponses->add($formulaireReponse);
  1686.           //  $formulaireReponse->setDossier($this);
  1687.         }
  1688.         return $this;
  1689.     }
  1690.     public function removeFormulaireReponse(QuizReponse $formulaireReponse): self
  1691.     {
  1692.         if ($this->formulaireReponses->removeElement($formulaireReponse)) {
  1693.             // set the owning side to null (unless already changed)
  1694.            // if ($formulaireReponse->getDossier() === $this) {
  1695.             //    $formulaireReponse->setDossier(null);
  1696.            // }
  1697.         }
  1698.         return $this;
  1699.     }
  1700. }