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

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