src/Entity/Examens.php line 19

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\FormationRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  8. use Symfony\Component\Validator\Constraints as Assert;
  9. use Symfony\Component\HttpFoundation\File\File;
  10. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  11. /**
  12.  * @ORM\Entity(repositoryClass=FormationRepository::class)
  13.  * @UniqueEntity(fields={"wording"},message="Ce nom est déjà utilisé." )
  14.  * @Vich\Uploadable
  15.  */
  16. class Examens
  17. {
  18.     /**
  19.      * @ORM\Id
  20.      * @ORM\GeneratedValue
  21.      * @ORM\Column(type="integer")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @ORM\Column(type="string", length=255)
  26.      */
  27.     private $wording;
  28.     /**
  29.      * @ORM\Column(type="text", nullable=true)
  30.      */
  31.     private $long_wording;
  32.     /**
  33.      * @ORM\Column(type="text", nullable=true)
  34.      */
  35.     private $description;
  36.     /**
  37.      * @ORM\Column(type="float", nullable=true)
  38.      */
  39.     private $duration;
  40.     /**
  41.      * @ORM\Column(type="string", length=10, nullable=true)
  42.      */
  43.     private $color;
  44.     /**
  45.      * @ORM\Column(type="integer")
  46.      */
  47.     private $max_student;
  48.     /**
  49.      * @ORM\Column(type="float")
  50.      */
  51.     private $price;
  52.     /**
  53.      * @ORM\OneToMany(targetEntity=Session::class, mappedBy="formation")
  54.      */
  55.     private $sessions;
  56.     /**
  57.      * @ORM\OneToMany(targetEntity=JustifForm::class, mappedBy="formation",cascade={"persist"})
  58.      */
  59.     private $justifForms;
  60.     /**
  61.      * @ORM\ManyToOne(targetEntity=Demande::class, inversedBy="formation",cascade={"persist"})
  62.      */
  63.     private $demande;
  64.     /**
  65.      * @ORM\OneToMany(targetEntity=Demande::class, mappedBy="positionnement")
  66.      */
  67.     private $positionnement;
  68.     /**
  69.      * @Doctrine\ORM\Mapping\Column(type="string", length=255, nullable=true)
  70.      */
  71.     private $image;
  72.     /**
  73.      * @Vich\UploadableField(mapping="logo_formation", fileNameProperty="image")
  74.      */
  75.     private $fichier;
  76.     /**
  77.      * @ORM\Column(type="datetime_immutable", nullable=true)
  78.      */
  79.     private $updateAt;
  80.     /**
  81.      * @ORM\ManyToOne(targetEntity=CategorieFormation::class, inversedBy="formations")
  82.      */
  83.     private $categorieformation;
  84.     /**
  85.      * @ORM\Column(type="boolean", nullable=true)
  86.      */
  87.     private $certificat;
  88.     /**
  89.      * @ORM\Column(type="boolean", nullable=true)
  90.      */
  91.     private $attestation;
  92.     /**
  93.      * @ORM\Column(type="boolean", nullable=true)
  94.      */
  95.     private $diplome;
  96.     /**
  97.      * @ORM\Column(type="boolean", nullable=true)
  98.      */
  99.     private $carte;
  100.     /**
  101.      * @ORM\Column(type="text", nullable=true)
  102.      */
  103.     private $objectif;
  104.     /**
  105.      * @ORM\Column(type="text", nullable=true)
  106.      */
  107.     private $wordingdiplome;
  108.     /**
  109.      * @ORM\Column(type="boolean", nullable=true)
  110.      */
  111.     private $formateur;
  112.     /**
  113.      * @ORM\Column(type="boolean", nullable=true)
  114.      */
  115.     private $longformation;
  116.     /**
  117.      * @ORM\OneToMany(targetEntity=OptionCategorieInscrit::class, mappedBy="formation")
  118.      */
  119.     private $optionCategorieInscrits;
  120.      /**
  121.      * @ORM\Column(type="boolean", nullable=true)
  122.      */
  123.     private $online;
  124.     /**
  125.      * @ORM\Column(type="text", nullable=true)
  126.      */
  127.     private $publicVise;
  128.     /**
  129.      * @ORM\Column(type="text", nullable=true)
  130.      */
  131.     private $competenceVise;
  132.     /**
  133.      * @ORM\Column(type="text", nullable=true)
  134.      */
  135.     private $modaliteEvaluation;
  136.     /**
  137.      * @ORM\Column(type="string", length=255, nullable=true)
  138.      */
  139.     private $lieu;
  140.     /**
  141.      * @ORM\Column(type="text", length=255, nullable=true)
  142.      */
  143.     private $DelaiAcces;
  144.     /**
  145.      * @ORM\Column(type="text", length=255, nullable=true)
  146.      */
  147.     private $TauxReussite;
  148.     /**
  149.      * @ORM\Column(type="text", nullable=true)
  150.      */
  151.     private $Prerequis;
  152.     /**
  153.      * @ORM\Column(type="text", nullable=true)
  154.      */
  155.     private $NiveauSortie;
  156.     /**
  157.      * @ORM\Column(type="text", nullable=true)
  158.      */
  159.     private $contenu;
  160.     /**
  161.      * @ORM\Column(type="text", nullable=true)
  162.      */
  163.     private $Debouche;
  164.     /**
  165.      * @ORM\Column(type="text", nullable=true)
  166.      */
  167.     private $methodeApprentissage;
  168.     /**
  169.      * @ORM\ManyToMany(targetEntity=DemandeDevisSite::class, mappedBy="formation")
  170.      */
  171.     private $demandeDevisSites;
  172.     /**
  173.      * @ORM\OneToMany(targetEntity=StagaireDemandeDevis::class, mappedBy="Formation")
  174.      */
  175.     private $stagaireDemandeDevis;
  176.      /**
  177.      * @ORM\Column(type="boolean", nullable=true)
  178.      */
  179.     private $evaluation;
  180.     /**
  181.      * @ORM\ManyToMany(targetEntity=ModuleSession::class, cascade={"persist"})
  182.      */
  183.     private $modules;
  184.     /**
  185.      * @ORM\OneToMany(targetEntity=DemandeDevisLigne::class, mappedBy="formation")
  186.      */
  187.     private $demandeDevisLignes;
  188.     public function __construct()
  189.     {
  190.         $this->sessions = new ArrayCollection();
  191.         $this->justifForms = new ArrayCollection();
  192.         $this->positionnement = new ArrayCollection();
  193.         $this->optionCategorieInscrits = new ArrayCollection();
  194.         $this->demandeDevisSites = new ArrayCollection();
  195.         $this->stagaireDemandeDevis = new ArrayCollection();
  196.         $this->modules = new ArrayCollection();
  197.         $this->demandeDevisLignes = new ArrayCollection();
  198.     }
  199.     public function __toString()
  200.     {
  201.         return $this->getWording(); 
  202.     }
  203.     public function getId(): ?int
  204.     {
  205.         return $this->id;
  206.     }
  207.     public function getWording(): ?string
  208.     {
  209.         return $this->wording;
  210.     }
  211.     public function setWording(string $wording): self
  212.     {
  213.         $this->wording $wording;
  214.         return $this;
  215.     }
  216.     public function isOnline(): ?bool
  217.     {
  218.         return $this->online;
  219.     }
  220.     public function setOnline(?bool $online): self
  221.     {
  222.         $this->online $online;
  223.         return $this;
  224.     }
  225.     public function getPublicVise(): ?string
  226.     {
  227.         return $this->publicVise;
  228.     }
  229.     public function setPublicVise(?string $publicVise): self
  230.     {
  231.         $this->publicVise $publicVise;
  232.         return $this;
  233.     }
  234.     public function getCompetenceVise(): ?string
  235.     {
  236.         return $this->competenceVise;
  237.     }
  238.     public function setCompetenceVise(?string $competenceVise): self
  239.     {
  240.         $this->competenceVise $competenceVise;
  241.         return $this;
  242.     }
  243.     public function getModaliteEvaluation(): ?string
  244.     {
  245.         return $this->modaliteEvaluation;
  246.     }
  247.     public function setModaliteEvaluation(?string $modaliteEvaluation): self
  248.     {
  249.         $this->modaliteEvaluation $modaliteEvaluation;
  250.         return $this;
  251.     }
  252.     public function getLieu(): ?string
  253.     {
  254.         return $this->lieu;
  255.     }
  256.     public function setLieu(?string $lieu): self
  257.     {
  258.         $this->lieu $lieu;
  259.         return $this;
  260.     }
  261.     public function getDelaiAcces(): ?string
  262.     {
  263.         return $this->DelaiAcces;
  264.     }
  265.     public function setDelaiAcces(?string $DelaiAcces): self
  266.     {
  267.         $this->DelaiAcces $DelaiAcces;
  268.         return $this;
  269.     }
  270.     public function getTauxReussite(): ?string
  271.     {
  272.         return $this->TauxReussite;
  273.     }
  274.     public function setTauxReussite(?string $TauxReussite): self
  275.     {
  276.         $this->TauxReussite $TauxReussite;
  277.         return $this;
  278.     }
  279.     public function getPrerequis(): ?string
  280.     {
  281.         return $this->Prerequis;
  282.     }
  283.     public function setPrerequis(?string $Prerequis): self
  284.     {
  285.         $this->Prerequis $Prerequis;
  286.         return $this;
  287.     }
  288.     public function getNiveauSortie(): ?string
  289.     {
  290.         return $this->NiveauSortie;
  291.     }
  292.     public function setNiveauSortie(?string $NiveauSortie): self
  293.     {
  294.         $this->NiveauSortie $NiveauSortie;
  295.         return $this;
  296.     }
  297.     public function getContenu(): ?string
  298.     {
  299.         return $this->contenu;
  300.     }
  301.     public function setContenu(?string $contenu): self
  302.     {
  303.         $this->contenu $contenu;
  304.         return $this;
  305.     }
  306.     public function getDebouche(): ?string
  307.     {
  308.         return $this->Debouche;
  309.     }
  310.     public function setDebouche(?string $Debouche): self
  311.     {
  312.         $this->Debouche $Debouche;
  313.         return $this;
  314.     }
  315.     public function getMethodeApprentissage(): ?string
  316.     {
  317.         return $this->methodeApprentissage;
  318.     }
  319.     public function setMethodeApprentissage(?string $methodeApprentissage): self
  320.     {
  321.         $this->methodeApprentissage $methodeApprentissage;
  322.         return $this;
  323.     }
  324.     /**
  325.      * @return Collection<int, DemandeDevisSite>
  326.      */
  327.     public function getDemandeDevisSites(): Collection
  328.     {
  329.         return $this->demandeDevisSites;
  330.     }
  331.     public function addDemandeDevisSite(DemandeDevisSite $demandeDevisSite): self
  332.     {
  333.         if (!$this->demandeDevisSites->contains($demandeDevisSite)) {
  334.             $this->demandeDevisSites[] = $demandeDevisSite;
  335.             $demandeDevisSite->addFormation($this);
  336.         }
  337.         return $this;
  338.     }
  339.     public function removeDemandeDevisSite(DemandeDevisSite $demandeDevisSite): self
  340.     {
  341.         if ($this->demandeDevisSites->removeElement($demandeDevisSite)) {
  342.             $demandeDevisSite->removeFormation($this);
  343.         }
  344.         return $this;
  345.     }
  346.     /**
  347.      * @return Collection<int, StagaireDemandeDevis>
  348.      */
  349.     public function getStagaireDemandeDevis(): Collection
  350.     {
  351.         return $this->stagaireDemandeDevis;
  352.     }
  353.     public function addStagaireDemandeDevi(StagaireDemandeDevis $stagaireDemandeDevi): self
  354.     {
  355.         if (!$this->stagaireDemandeDevis->contains($stagaireDemandeDevi)) {
  356.             $this->stagaireDemandeDevis[] = $stagaireDemandeDevi;
  357.             $stagaireDemandeDevi->setFormation($this);
  358.         }
  359.         return $this;
  360.     }
  361.     public function removeStagaireDemandeDevi(StagaireDemandeDevis $stagaireDemandeDevi): self
  362.     {
  363.         if ($this->stagaireDemandeDevis->removeElement($stagaireDemandeDevi)) {
  364.             // set the owning side to null (unless already changed)
  365.             if ($stagaireDemandeDevi->getFormation() === $this) {
  366.                 $stagaireDemandeDevi->setFormation(null);
  367.             }
  368.         }
  369.         return $this;
  370.     }
  371.     public function getLongWording(): ?string
  372.     {
  373.         return $this->long_wording;
  374.     }
  375.     public function setLongWording(?string $long_wording): self
  376.     {
  377.         $this->long_wording $long_wording;
  378.         return $this;
  379.     }
  380.     public function getDescription(): ?string
  381.     {
  382.         return $this->description;
  383.     }
  384.     public function setDescription(?string $description): self
  385.     {
  386.         $this->description $description;
  387.         return $this;
  388.     }
  389.     public function getDuration(): ?float
  390.     {
  391.         return $this->duration;
  392.     }
  393.     public function setDuration(?float $duration): self
  394.     {
  395.         $this->duration $duration;
  396.         return $this;
  397.     }
  398.     public function getColor(): ?string
  399.     {
  400.         return $this->color;
  401.     }
  402.     public function setColor(?string $color): self
  403.     {
  404.         $this->color $color;
  405.         return $this;
  406.     }
  407.     public function getMaxStudent(): ?int
  408.     {
  409.         return $this->max_student;
  410.     }
  411.     public function setMaxStudent(int $max_student): self
  412.     {
  413.         $this->max_student $max_student;
  414.         return $this;
  415.     }
  416.     public function getPrice(): ?float
  417.     {
  418.         return $this->price;
  419.     }
  420.     public function setPrice(float $price): self
  421.     {
  422.         $this->price $price;
  423.         return $this;
  424.     }
  425.     /**
  426.      * @return Collection<int, Session>
  427.      */
  428.     public function getSessions(): Collection
  429.     {
  430.         return $this->sessions;
  431.     }
  432.     public function addSession(Session $session): self
  433.     {
  434.         if (!$this->sessions->contains($session)) {
  435.             $this->sessions[] = $session;
  436.             $session->setFormation($this);
  437.         }
  438.         return $this;
  439.     }
  440.     public function removeSession(Session $session): self
  441.     {
  442.         if ($this->sessions->removeElement($session)) {
  443.             // set the owning side to null (unless already changed)
  444.             if ($session->getFormation() === $this) {
  445.                 $session->setFormation(null);
  446.             }
  447.         }
  448.         return $this;
  449.     }
  450.     /**
  451.      * @return Collection<int, JustifForm>
  452.      */
  453.     public function getJustifForms(): Collection
  454.     {
  455.         return $this->justifForms;
  456.     }
  457.     public function addJustifForm(JustifForm $justifForm): self
  458.     {
  459.         if (!$this->justifForms->contains($justifForm)) {
  460.             $this->justifForms[] = $justifForm;
  461.             $justifForm->setFormation($this);
  462.         }
  463.         return $this;
  464.     }
  465.     public function removeJustifForm(JustifForm $justifForm): self
  466.     {
  467.         if ($this->justifForms->removeElement($justifForm)) {
  468.             // set the owning side to null (unless already changed)
  469.             if ($justifForm->getFormation() === $this) {
  470.                 $justifForm->setFormation(null);
  471.             }
  472.         }
  473.         return $this;
  474.     }
  475.     public function getDemande(): ?Demande
  476.     {
  477.         return $this->demande;
  478.     }
  479.     public function setDemande(?Demande $demande): self
  480.     {
  481.         $this->demande $demande;
  482.         return $this;
  483.     }
  484.     /**
  485.      * @return Collection<int, Demande>
  486.      */
  487.     public function getPositionnement(): Collection
  488.     {
  489.         return $this->positionnement;
  490.     }
  491.     public function addPositionnement(Demande $positionnement): self
  492.     {
  493.         if (!$this->positionnement->contains($positionnement)) {
  494.             $this->positionnement[] = $positionnement;
  495.             $positionnement->setPositionnement($this);
  496.         }
  497.         return $this;
  498.     }
  499.     public function removePositionnement(Demande $positionnement): self
  500.     {
  501.         if ($this->positionnement->removeElement($positionnement)) {
  502.             // set the owning side to null (unless already changed)
  503.             if ($positionnement->getPositionnement() === $this) {
  504.                 $positionnement->setPositionnement(null);
  505.             }
  506.         }
  507.         return $this;
  508.     }
  509.     public function setFichier(?File $image null)
  510.     {
  511.         $this->fichier $image;
  512.         if ($image) {
  513.             $this->updateAt = new \DateTimeImmutable();
  514.         }
  515.     }
  516.     public function getFichier()
  517.     {
  518.         return $this->fichier;
  519.     }
  520.     public function setImage($image)
  521.     {
  522.         $this->image $image;
  523.     }
  524.     public function getImage()
  525.     {
  526.         return $this->image;
  527.     }
  528.     public function getUpdateAt(): ?\DateTimeImmutable
  529.     {
  530.         return $this->updateAt;
  531.     }
  532.     public function setUpdateAt(?\DateTimeImmutable $updateAt): self
  533.     {
  534.         $this->updateAt $updateAt;
  535.         return $this;
  536.     }
  537.     public function getCategorieformation(): ?CategorieFormation
  538.     {
  539.         return $this->categorieformation;
  540.     }
  541.     public function setCategorieformation(?CategorieFormation $categorieformation): self
  542.     {
  543.         $this->categorieformation $categorieformation;
  544.         return $this;
  545.     }
  546.     public function isCertificat(): ?bool
  547.     {
  548.         return $this->certificat;
  549.     }
  550.     public function setCertificat(?bool $certificat): self
  551.     {
  552.         $this->certificat $certificat;
  553.         return $this;
  554.     }
  555.     public function isAttestation(): ?bool
  556.     {
  557.         return $this->attestation;
  558.     }
  559.     public function setAttestation(?bool $attestation): self
  560.     {
  561.         $this->attestation $attestation;
  562.         return $this;
  563.     }
  564.     public function isDiplome(): ?bool
  565.     {
  566.         return $this->diplome;
  567.     }
  568.     public function setDiplome(?bool $diplome): self
  569.     {
  570.         $this->diplome $diplome;
  571.         return $this;
  572.     }
  573.     public function isCarte(): ?bool
  574.     {
  575.         return $this->carte;
  576.     }
  577.     public function setCarte(?bool $carte): self
  578.     {
  579.         $this->carte $carte;
  580.         return $this;
  581.     }
  582.     public function getObjectif(): ?string
  583.     {
  584.         return $this->objectif;
  585.     }
  586.     public function setObjectif(?string $objectif): self
  587.     {
  588.         $this->objectif $objectif;
  589.         return $this;
  590.     }
  591.     public function getWordingdiplome(): ?string
  592.     {
  593.         return $this->wordingdiplome;
  594.     }
  595.     public function setWordingdiplome(?string $wordingdiplome): self
  596.     {
  597.         $this->wordingdiplome $wordingdiplome;
  598.         return $this;
  599.     }
  600.     public function isFormateur(): ?bool
  601.     {
  602.         return $this->formateur;
  603.     }
  604.     public function setFormateur(?bool $formateur): self
  605.     {
  606.         $this->formateur $formateur;
  607.         return $this;
  608.     }
  609.     public function isLongformation(): ?bool
  610.     {
  611.         return $this->longformation;
  612.     }
  613.     public function setLongformation(?bool $longformation): self
  614.     {
  615.         $this->longformation $longformation;
  616.         return $this;
  617.     }
  618.     /**
  619.      * @return Collection<int, OptionCategorieInscrit>
  620.      */
  621.     public function getOptionCategorieInscrits(): Collection
  622.     {
  623.         return $this->optionCategorieInscrits;
  624.     }
  625.     public function addOptionCategorieInscrit(OptionCategorieInscrit $optionCategorieInscrit): self
  626.     {
  627.         if (!$this->optionCategorieInscrits->contains($optionCategorieInscrit)) {
  628.             $this->optionCategorieInscrits[] = $optionCategorieInscrit;
  629.             $optionCategorieInscrit->setFormation($this);
  630.         }
  631.         return $this;
  632.     }
  633.     public function removeOptionCategorieInscrit(OptionCategorieInscrit $optionCategorieInscrit): self
  634.     {
  635.         if ($this->optionCategorieInscrits->removeElement($optionCategorieInscrit)) {
  636.             // set the owning side to null (unless already changed)
  637.             if ($optionCategorieInscrit->getFormation() === $this) {
  638.                 $optionCategorieInscrit->setFormation(null);
  639.             }
  640.         }
  641.         return $this;
  642.     }
  643.     public function isEvaluation(): ?bool
  644.     {
  645.         return $this->evaluation;
  646.     }
  647.     public function setEvaluation(?bool $online): self
  648.     {
  649.         $this->evaluation $online;
  650.         return $this;
  651.     }
  652.      /**
  653.      * @return Collection<int, ModuleSession>
  654.      */
  655.     public function getModules(): Collection
  656.     {
  657.         return $this->modules;
  658.     }
  659.     public function addModule(ModuleSession $module): self
  660.     {
  661.         if (!$this->modules->contains($module)) {
  662.             $this->modules[] = $module;
  663.         }
  664.         return $this;
  665.     }
  666.     public function removeModule(ModuleSession $module): self
  667.     {
  668.         $this->modules->removeElement($module);
  669.         return $this;
  670.     }
  671.     /**
  672.      * @return Collection<int, DemandeDevisLigne>
  673.      */
  674.     public function getDemandeDevisLignes(): Collection
  675.     {
  676.         return $this->demandeDevisLignes;
  677.     }
  678.     public function addDemandeDevisLigne(DemandeDevisLigne $demandeDevisLigne): self
  679.     {
  680.         if (!$this->demandeDevisLignes->contains($demandeDevisLigne)) {
  681.             $this->demandeDevisLignes[] = $demandeDevisLigne;
  682.             $demandeDevisLigne->setFormation($this);
  683.         }
  684.         return $this;
  685.     }
  686.     public function removeDemandeDevisLigne(DemandeDevisLigne $demandeDevisLigne): self
  687.     {
  688.         if ($this->demandeDevisLignes->removeElement($demandeDevisLigne)) {
  689.             // set the owning side to null (unless already changed)
  690.             if ($demandeDevisLigne->getFormation() === $this) {
  691.                 $demandeDevisLigne->setFormation(null);
  692.             }
  693.         }
  694.         return $this;
  695.     }
  696. }