src/Entity/Ecole.php line 12

  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\EcoleRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\DBAL\Types\Types;
  7. use Doctrine\ORM\Mapping as ORM;
  8. #[ORM\Entity(repositoryClassEcoleRepository::class)]
  9. class Ecole
  10. {
  11.     const STATUS_BROUILLON "BROUILLON";
  12.     const STATUS_SOUMIS "SOUMIS";
  13.     const STATUS_VALIDEE "VALIDEE";
  14.     const STATUS_REJETEE "REJETEE";
  15.     const DOCUMENT_INSCRIPTION_ABSTRACT "ABSTRACT";
  16.     const DOCUMENT_INSCRIPTION_CV "CV";
  17.     const DOCUMENT_INSCRIPTION_AUTRE "AUTRE";
  18.     const DOCUMENT_INSCRIPTION_LETTRE_MOTIVATION "LETTRE_MOTIVATION";
  19.     #[ORM\Id]
  20.     #[ORM\GeneratedValue]
  21.     #[ORM\Column]
  22.     private ?int $id null;
  23.     #[ORM\Column(length255nullabletrue)]
  24.     private ?string $libelle null;
  25.     #[ORM\ManyToOne (cascade: ["persist"])]
  26.     private ?TailleEcole $taillePrevue null;
  27.     #[ORM\ManyToOne (cascade: ["persist"])]
  28.     private ?FormatEcole $formatPropose null;
  29.     #[ORM\ManyToOne (cascade: ["persist"])]
  30.     private ?FrequenceEcole $frequencePropose null;
  31.     #[ORM\Column(nullabletrue)]
  32.     private ?int $nbJours null;
  33.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  34.     private ?\DateTimeInterface $marsAMaiDateDebut null;
  35.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  36.     private ?\DateTimeInterface $marsAMaiDateFin null;
  37.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  38.     private ?\DateTimeInterface $juinAAoutDateDebut null;
  39.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  40.     private ?\DateTimeInterface $juinAAoutDateFin null;
  41.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  42.     private ?\DateTimeInterface $septembreANovembreDateDebut null;
  43.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  44.     private ?\DateTimeInterface $septembreANovembreDateFin null;
  45.     #[ORM\Column(length255nullabletrue)]
  46.     private ?string $porteurProjetPrenom null;
  47.     #[ORM\Column(length255nullabletrue)]
  48.     private ?string $porteurProjetNom null;
  49.     #[ORM\Column(length255nullabletrue)]
  50.     private ?string $porteurProjetLaboratoire null;
  51.     #[ORM\Column(length255nullabletrue)]
  52.     private ?string $porterProjetAdressePostale null;
  53.     #[ORM\Column(length255nullabletrue)]
  54.     private ?string $porteurProjetCodePostal null;
  55.     #[ORM\Column(length255nullabletrue)]
  56.     private ?string $porteurProjetVille null;
  57.     #[ORM\Column(length255nullabletrue)]
  58.     private ?string $porterProjetPays null;
  59.     #[ORM\Column(length255nullabletrue)]
  60.     private ?string $porteurProjetTel null;
  61.     #[ORM\Column(length255nullabletrue)]
  62.     private ?string $porterProjetPortable null;
  63.     #[ORM\Column(length255nullabletrue)]
  64.     private ?string $porteurProjetEmail null;
  65.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  66.     private ?string $breveDescription null;
  67.     #[ORM\Column(length255nullabletrue)]
  68.     private ?string $siteWeb null;
  69.     #[ORM\Column(length255nullabletrue)]
  70.     private ?string $emailGenerique null;
  71.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  72.     private ?string $informationComplementaire null;
  73.     #[ORM\OneToMany(mappedBy'ecole'targetEntityContactMember::class, orphanRemovaltruecascade: ["persist"])]
  74.     private Collection $membres;
  75.     #[ORM\OneToMany(mappedBy'ecole'targetEntityEcoleThematique::class, orphanRemovaltrue,  cascade: ["persist"])]
  76.     private Collection $thematiques;
  77.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  78.     private ?string $descriptionActivite null;
  79.     #[ORM\Column(typeTypes::ARRAY, nullabletrue)]
  80.     private array $motsCles = [];
  81.     #[ORM\OneToMany(mappedBy'ecoleComiteScientifique'targetEntityMembre::class, orphanRemovaltrue,  cascade: ["persist"])]
  82.     private Collection $membresComiteScientifique;
  83.     #[ORM\OneToMany(mappedBy'ecoleComiteOrganisation'targetEntityMembre::class, orphanRemovaltrue,  cascade: ["persist"])]
  84.     private Collection $membresComiteOrganisation;
  85.     #[ORM\Column(typeTypes::ARRAY, nullabletrue)]
  86.     private array $public = [];
  87.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  88.     private ?string $programme null;
  89.     #[ORM\Column(nullabletrue)]
  90.     private ?bool $grandPublic null;
  91.     #[ORM\OneToMany(mappedBy'ecole'targetEntityOrateur::class, orphanRemovaltrue,  cascade: ["persist"])]
  92.     private Collection $orateurs;
  93.     #[ORM\OneToMany(mappedBy'ecole'targetEntitySubvention::class, orphanRemovaltrue,  cascade: ["persist"])]
  94.     private Collection $subventions;
  95.     #[ORM\Column(typeTypes::TEXTnullabletrue)]
  96.     private ?string $commentaire null;
  97.     #[ORM\Column(length255nullabletrue)]
  98.     private ?string $modeInscription null;
  99.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  100.     private ?\DateTimeInterface $dateInscriptionDebut null;
  101.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  102.     private ?\DateTimeInterface $dateInscriptionFin null;
  103.     #[ORM\Column(length255nullabletrue)]
  104.     private ?string $statut self::STATUS_BROUILLON;
  105.     #[ORM\Column(length1nullabletrue)]
  106.     private ?string $single null;
  107.     #[ORM\Column(length1nullabletrue)]
  108.     private ?string $accompagnants null;
  109.     #[ORM\OneToMany(mappedBy'ecole'targetEntityInscription::class, orphanRemovaltrue,  cascade: ["persist"])]
  110.     private Collection $inscriptions;
  111.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  112.     private ?\DateTimeInterface $datePreInscriptionDebut null;
  113.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  114.     private ?\DateTimeInterface $datePreInscriptionFin null;
  115.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  116.     private ?\DateTimeInterface $dateDefinitiveValideDebut null;
  117.     #[ORM\Column(typeTypes::DATE_MUTABLEnullabletrue)]
  118.     private ?\DateTimeInterface $dateDefinitiveValideFin null;
  119.     #[ORM\ManyToMany(targetEntityUser::class, inversedBy'gestionEcoles')]
  120.     private Collection $gestionnaires;
  121.     #[ORM\OneToMany(mappedBy'ecole'targetEntityEcoleFile::class, cascade: ["persist"])]
  122.     private Collection $files;
  123.     #[ORM\Column(typeTypes::SIMPLE_ARRAYnullabletrue)]
  124.     private array $documentsInscription = [];
  125.     public function __construct()
  126.     {
  127.         $this->membres = new ArrayCollection();
  128.         $this->thematiques = new ArrayCollection();
  129.         $this->membresComiteScientifique = new ArrayCollection();
  130.         $this->membresComiteOrganisation = new ArrayCollection();
  131.         $this->orateurs = new ArrayCollection();
  132.         $this->subventions = new ArrayCollection();
  133.         $this->inscriptions = new ArrayCollection();
  134.         $this->gestionnaires = new ArrayCollection();
  135.         $this->files = new ArrayCollection();
  136.     }
  137.     public function getId(): ?int
  138.     {
  139.         return $this->id;
  140.     }
  141.     public function getLibelle(): ?string
  142.     {
  143.         return $this->libelle;
  144.     }
  145.     public function setLibelle(?string $libelle): self
  146.     {
  147.         $this->libelle $libelle;
  148.         return $this;
  149.     }
  150.     public function getTaillePrevue(): ?TailleEcole
  151.     {
  152.         return $this->taillePrevue;
  153.     }
  154.     public function setTaillePrevue(?TailleEcole $taillePrevue): self
  155.     {
  156.         $this->taillePrevue $taillePrevue;
  157.         return $this;
  158.     }
  159.     public function getFormatPropose(): ?FormatEcole
  160.     {
  161.         return $this->formatPropose;
  162.     }
  163.     public function setFormatPropose(?FormatEcole $formatPropose): self
  164.     {
  165.         $this->formatPropose $formatPropose;
  166.         return $this;
  167.     }
  168.     public function getFrequencePropose(): ?FrequenceEcole
  169.     {
  170.         return $this->frequencePropose;
  171.     }
  172.     public function setFrequencePropose(?FrequenceEcole $frequencePropose): self
  173.     {
  174.         $this->frequencePropose $frequencePropose;
  175.         return $this;
  176.     }
  177.     public function getNbJours(): ?int
  178.     {
  179.         return $this->nbJours;
  180.     }
  181.     public function setNbJours(?int $nbJours): self
  182.     {
  183.         $this->nbJours $nbJours;
  184.         return $this;
  185.     }
  186.     public function getMarsAMaiDateDebut(): ?\DateTimeInterface
  187.     {
  188.         return $this->marsAMaiDateDebut;
  189.     }
  190.     public function setMarsAMaiDateDebut(?\DateTimeInterface $marsAMaiDateDebut): self
  191.     {
  192.         $this->marsAMaiDateDebut $marsAMaiDateDebut;
  193.         return $this;
  194.     }
  195.     public function getMarsAMaiDateFin(): ?\DateTimeInterface
  196.     {
  197.         return $this->marsAMaiDateFin;
  198.     }
  199.     public function setMarsAMaiDateFin(?\DateTimeInterface $marsAMaiDateFin): self
  200.     {
  201.         $this->marsAMaiDateFin $marsAMaiDateFin;
  202.         return $this;
  203.     }
  204.     public function getJuinAAoutDateDebut(): ?\DateTimeInterface
  205.     {
  206.         return $this->juinAAoutDateDebut;
  207.     }
  208.     public function setJuinAAoutDateDebut(?\DateTimeInterface $juinAAoutDateDebut): self
  209.     {
  210.         $this->juinAAoutDateDebut $juinAAoutDateDebut;
  211.         return $this;
  212.     }
  213.     public function getJuinAAoutDateFin(): ?\DateTimeInterface
  214.     {
  215.         return $this->juinAAoutDateFin;
  216.     }
  217.     public function setJuinAAoutDateFin(?\DateTimeInterface $juinAAoutDateFin): self
  218.     {
  219.         $this->juinAAoutDateFin $juinAAoutDateFin;
  220.         return $this;
  221.     }
  222.     public function getSeptembreANovembreDateDebut(): ?\DateTimeInterface
  223.     {
  224.         return $this->septembreANovembreDateDebut;
  225.     }
  226.     public function setSeptembreANovembreDateDebut(?\DateTimeInterface $septembreANovembreDateDebut): self
  227.     {
  228.         $this->septembreANovembreDateDebut $septembreANovembreDateDebut;
  229.         return $this;
  230.     }
  231.     public function getSeptembreANovembreDateFin(): ?\DateTimeInterface
  232.     {
  233.         return $this->septembreANovembreDateFin;
  234.     }
  235.     public function setSeptembreANovembreDateFin(?\DateTimeInterface $septembreANovembreDateFin): self
  236.     {
  237.         $this->septembreANovembreDateFin $septembreANovembreDateFin;
  238.         return $this;
  239.     }
  240.     public function getPorteurProjetPrenom(): ?string
  241.     {
  242.         return $this->porteurProjetPrenom;
  243.     }
  244.     public function setPorteurProjetPrenom(?string $porteurProjetPrenom): self
  245.     {
  246.         $this->porteurProjetPrenom $porteurProjetPrenom;
  247.         return $this;
  248.     }
  249.     public function getPorteurProjetNom(): ?string
  250.     {
  251.         return $this->porteurProjetNom;
  252.     }
  253.     public function setPorteurProjetNom(?string $porteurProjetNom): self
  254.     {
  255.         $this->porteurProjetNom $porteurProjetNom;
  256.         return $this;
  257.     }
  258.     public function getPorteurProjetLaboratoire(): ?string
  259.     {
  260.         return $this->porteurProjetLaboratoire;
  261.     }
  262.     public function setPorteurProjetLaboratoire(?string $porteurProjetLaboratoire): self
  263.     {
  264.         $this->porteurProjetLaboratoire $porteurProjetLaboratoire;
  265.         return $this;
  266.     }
  267.     public function getPorterProjetAdressePostale(): ?string
  268.     {
  269.         return $this->porterProjetAdressePostale;
  270.     }
  271.     public function setPorterProjetAdressePostale(?string $porterProjetAdressePostale): self
  272.     {
  273.         $this->porterProjetAdressePostale $porterProjetAdressePostale;
  274.         return $this;
  275.     }
  276.     public function getPorteurProjetCodePostal(): ?string
  277.     {
  278.         return $this->porteurProjetCodePostal;
  279.     }
  280.     public function setPorteurProjetCodePostal(?string $porteurProjetCodePostal): self
  281.     {
  282.         $this->porteurProjetCodePostal $porteurProjetCodePostal;
  283.         return $this;
  284.     }
  285.     public function getPorteurProjetVille(): ?string
  286.     {
  287.         return $this->porteurProjetVille;
  288.     }
  289.     public function setPorteurProjetVille(?string $porteurProjetVille): self
  290.     {
  291.         $this->porteurProjetVille $porteurProjetVille;
  292.         return $this;
  293.     }
  294.     public function getPorterProjetPays(): ?string
  295.     {
  296.         return $this->porterProjetPays;
  297.     }
  298.     public function setPorterProjetPays(?string $porterProjetPays): self
  299.     {
  300.         $this->porterProjetPays $porterProjetPays;
  301.         return $this;
  302.     }
  303.     public function getPorteurProjetTel(): ?string
  304.     {
  305.         return $this->porteurProjetTel;
  306.     }
  307.     public function setPorteurProjetTel(?string $porteurProjetTel): self
  308.     {
  309.         $this->porteurProjetTel $porteurProjetTel;
  310.         return $this;
  311.     }
  312.     public function getPorterProjetPortable(): ?string
  313.     {
  314.         return $this->porterProjetPortable;
  315.     }
  316.     public function setPorterProjetPortable(?string $porterProjetPortable): self
  317.     {
  318.         $this->porterProjetPortable $porterProjetPortable;
  319.         return $this;
  320.     }
  321.     public function getPorteurProjetEmail(): ?string
  322.     {
  323.         return $this->porteurProjetEmail;
  324.     }
  325.     public function setPorteurProjetEmail(?string $porteurProjetEmail): self
  326.     {
  327.         $this->porteurProjetEmail $porteurProjetEmail;
  328.         return $this;
  329.     }
  330.     public function getBreveDescription(): ?string
  331.     {
  332.         return $this->breveDescription;
  333.     }
  334.     public function setBreveDescription(string $breveDescription): self
  335.     {
  336.         $this->breveDescription $breveDescription;
  337.         return $this;
  338.     }
  339.     public function getSiteWeb(): ?string
  340.     {
  341.         return $this->siteWeb;
  342.     }
  343.     public function setSiteWeb(?string $siteWeb): self
  344.     {
  345.         $this->siteWeb $siteWeb;
  346.         return $this;
  347.     }
  348.     public function getEmailGenerique(): ?string
  349.     {
  350.         return $this->emailGenerique;
  351.     }
  352.     public function setEmailGenerique(?string $emailGenerique): self
  353.     {
  354.         $this->emailGenerique $emailGenerique;
  355.         return $this;
  356.     }
  357.     public function getInformationComplementaire(): ?string
  358.     {
  359.         return $this->informationComplementaire;
  360.     }
  361.     public function setInformationComplementaire(?string $informationComplementaire): self
  362.     {
  363.         $this->informationComplementaire $informationComplementaire;
  364.         return $this;
  365.     }
  366.     /**
  367.      * @return Collection<int, ContactMember>
  368.      */
  369.     public function getMembres(): Collection
  370.     {
  371.         return $this->membres;
  372.     }
  373.     public function addMembre(ContactMember $membre): self
  374.     {
  375.         if (!$this->membres->contains($membre)) {
  376.             $this->membres->add($membre);
  377.             $membre->setEcole($this);
  378.         }
  379.         return $this;
  380.     }
  381.     public function removeMembre(ContactMember $membre): self
  382.     {
  383.         if ($this->membres->removeElement($membre)) {
  384.             // set the owning side to null (unless already changed)
  385.             if ($membre->getEcole() === $this) {
  386.                 $membre->setEcole(null);
  387.             }
  388.         }
  389.         return $this;
  390.     }
  391.     /**
  392.      * @return Collection<int, EcoleThematique>
  393.      */
  394.     public function getThematiques(): Collection
  395.     {
  396.         return $this->thematiques;
  397.     }
  398.     public function addThematique(EcoleThematique $thematique): self
  399.     {
  400.         if (!$this->thematiques->contains($thematique)) {
  401.             $this->thematiques->add($thematique);
  402.             $thematique->setEcole($this);
  403.         }
  404.         return $this;
  405.     }
  406.     public function removeThematique(EcoleThematique $thematique): self
  407.     {
  408.         if ($this->thematiques->removeElement($thematique)) {
  409.             // set the owning side to null (unless already changed)
  410.             if ($thematique->getEcole() === $this) {
  411.                 $thematique->setEcole(null);
  412.             }
  413.         }
  414.         return $this;
  415.     }
  416.     public function getDescriptionActivite(): ?string
  417.     {
  418.         return $this->descriptionActivite;
  419.     }
  420.     public function setDescriptionActivite(?string $descriptionActivite): self
  421.     {
  422.         $this->descriptionActivite $descriptionActivite;
  423.         return $this;
  424.     }
  425.     public function getMotsCles(): array
  426.     {
  427.         return $this->motsCles;
  428.     }
  429.     public function setMotsCles(?array $motsCles): self
  430.     {
  431.         $this->motsCles $motsCles;
  432.         return $this;
  433.     }
  434.     /**
  435.      * @return Collection<int, Membre>
  436.      */
  437.     public function getMembresComiteScientifique(): Collection
  438.     {
  439.         return $this->membresComiteScientifique;
  440.     }
  441.     public function addMembresComiteScientifique(Membre $membresComiteScientifique): self
  442.     {
  443.         if (!$this->membresComiteScientifique->contains($membresComiteScientifique)) {
  444.             $this->membresComiteScientifique->add($membresComiteScientifique);
  445.             $membresComiteScientifique->setEcoleComiteScientifique($this);
  446.         }
  447.         return $this;
  448.     }
  449.     public function removeMembresComiteScientifique(Membre $membresComiteScientifique): self
  450.     {
  451.         if ($this->membresComiteScientifique->removeElement($membresComiteScientifique)) {
  452.             // set the owning side to null (unless already changed)
  453.             if ($membresComiteScientifique->getEcoleComiteScientifique() === $this) {
  454.                 $membresComiteScientifique->setEcoleComiteScientifique(null);
  455.             }
  456.         }
  457.         return $this;
  458.     }
  459.     /**
  460.      * @return Collection<int, Membre>
  461.      */
  462.     public function getMembresComiteOrganisation(): Collection
  463.     {
  464.         return $this->membresComiteOrganisation;
  465.     }
  466.     public function addMembresComiteOrganisation(Membre $membresComiteOrganisation): self
  467.     {
  468.         if (!$this->membresComiteOrganisation->contains($membresComiteOrganisation)) {
  469.             $this->membresComiteOrganisation->add($membresComiteOrganisation);
  470.             $membresComiteOrganisation->setEcoleComiteOrganisation($this);
  471.         }
  472.         return $this;
  473.     }
  474.     public function removeMembresComiteOrganisation(Membre $membresComiteOrganisation): self
  475.     {
  476.         if ($this->membresComiteOrganisation->removeElement($membresComiteOrganisation)) {
  477.             // set the owning side to null (unless already changed)
  478.             if ($membresComiteOrganisation->getEcoleComiteOrganisation() === $this) {
  479.                 $membresComiteOrganisation->setEcoleComiteOrganisation(null);
  480.             }
  481.         }
  482.         return $this;
  483.     }
  484.     public function getPublic(): array
  485.     {
  486.         return $this->public;
  487.     }
  488.     public function setPublic(?array $public): self
  489.     {
  490.         $this->public $public;
  491.         return $this;
  492.     }
  493.     public function getProgramme(): ?string
  494.     {
  495.         return $this->programme;
  496.     }
  497.     public function setProgramme(?string $programme): self
  498.     {
  499.         $this->programme $programme;
  500.         return $this;
  501.     }
  502.     public function isGrandPublic(): ?bool
  503.     {
  504.         return $this->grandPublic;
  505.     }
  506.     public function setGrandPublic(bool $grandPublic): self
  507.     {
  508.         $this->grandPublic $grandPublic;
  509.         return $this;
  510.     }
  511.     /**
  512.      * @return Collection<int, Orateur>
  513.      */
  514.     public function getOrateurs(): Collection
  515.     {
  516.         return $this->orateurs;
  517.     }
  518.     public function addOrateur(Orateur $orateur): self
  519.     {
  520.         if (!$this->orateurs->contains($orateur)) {
  521.             $this->orateurs->add($orateur);
  522.             $orateur->setEcole($this);
  523.         }
  524.         return $this;
  525.     }
  526.     public function removeOrateur(Orateur $orateur): self
  527.     {
  528.         if ($this->orateurs->removeElement($orateur)) {
  529.             // set the owning side to null (unless already changed)
  530.             if ($orateur->getEcole() === $this) {
  531.                 $orateur->setEcole(null);
  532.             }
  533.         }
  534.         return $this;
  535.     }
  536.     /**
  537.      * @return Collection<int, Subvention>
  538.      */
  539.     public function getSubventions(): Collection
  540.     {
  541.         return $this->subventions;
  542.     }
  543.     public function addSubvention(Subvention $subvention): self
  544.     {
  545.         if (!$this->subventions->contains($subvention)) {
  546.             $this->subventions->add($subvention);
  547.             $subvention->setEcole($this);
  548.         }
  549.         return $this;
  550.     }
  551.     public function removeSubvention(Subvention $subvention): self
  552.     {
  553.         if ($this->subventions->removeElement($subvention)) {
  554.             // set the owning side to null (unless already changed)
  555.             if ($subvention->getEcole() === $this) {
  556.                 $subvention->setEcole(null);
  557.             }
  558.         }
  559.         return $this;
  560.     }
  561.     public function getCommentaire(): ?string
  562.     {
  563.         return $this->commentaire;
  564.     }
  565.     public function setCommentaire(?string $commentaire): self
  566.     {
  567.         $this->commentaire $commentaire;
  568.         return $this;
  569.     }
  570.     public function getModeInscription(): ?string
  571.     {
  572.         return $this->modeInscription;
  573.     }
  574.     public function setModeInscription(?string $modeInscription): self
  575.     {
  576.         $this->modeInscription $modeInscription;
  577.         return $this;
  578.     }
  579.     public function getPorteurProjetFullName(): string
  580.     {
  581.         return $this->getPorteurProjetPrenom() . ' ' $this->getPorteurProjetNom();
  582.     }
  583.     public function getDateEcoleText(): string
  584.     {
  585.         $dateDebut '';
  586.         $dateFin '';
  587.         if ($this->getDateDefinitiveValideDebut()) {
  588.             $dateDebut $this->getDateDefinitiveValideDebut()->format('d/m/Y');
  589.         } else if ($this->getJuinAAoutDateDebut()) {
  590.             $dateDebut $this->getJuinAAoutDateDebut()->format('d/m/Y');
  591.         } else if ($this->getMarsAMaiDateDebut()) {
  592.             $dateDebut $this->getMarsAMaiDateDebut()->format('d/m/Y');
  593.         } else if ($this->getSeptembreANovembreDateDebut()) {
  594.             $dateDebut $this->getSeptembreANovembreDateDebut()->format('d/m/Y');
  595.         }
  596.         if ($this->getDateDefinitiveValideFin()) {
  597.             $dateFin $this->getDateDefinitiveValideFin()->format('d/m/Y');
  598.         } else if ($this->getJuinAAoutDateFin()) {
  599.             $dateFin $this->getJuinAAoutDateFin()->format('d/m/Y');
  600.         } else if ($this->getMarsAMaiDateFin()) {
  601.             $dateFin $this->getMarsAMaiDateFin()->format('d/m/Y');
  602.         } else if ($this->getSeptembreANovembreDateFin()) {
  603.             $dateFin $this->getSeptembreANovembreDateFin()->format('d/m/Y');
  604.         }
  605.         return $dateDebut ' - ' $dateFin;
  606.     }
  607.     public function getDateInscriptionDebut(): ?\DateTimeInterface
  608.     {
  609.         return $this->dateInscriptionDebut;
  610.     }
  611.     public function setDateInscriptionDebut(?\DateTimeInterface $dateInscriptionDebut): self
  612.     {
  613.         $this->dateInscriptionDebut $dateInscriptionDebut;
  614.         return $this;
  615.     }
  616.     public function isAffichable(): bool
  617.     {
  618.         if ($this->dateDefinitiveValideFin === null) {
  619.             return false;
  620.         }
  621.         return $this->statut === self::STATUS_VALIDEE && (int) $this->dateDefinitiveValideFin->format('Y') >= (int) date('Y');
  622.     }
  623.     public function isInscriptionOuverte(): bool
  624.     {
  625.         if ($this->dateInscriptionDebut === null || $this->dateInscriptionFin === null) {
  626.             return false;
  627.         }
  628.         $now = new \DateTime();
  629.         if($this->modeInscription == 'ONE_STEP') {
  630.             return $now >= $this->dateInscriptionDebut && $now <= $this->dateInscriptionFin;
  631.         } else { // TWO_STEPS (default)
  632.             return $now >= $this->datePreInscriptionDebut && $now <= $this->datePreInscriptionFin;
  633.         }
  634.     }
  635.     public function getDateInscriptionFin(): ?\DateTimeInterface
  636.     {
  637.         return $this->dateInscriptionFin;
  638.     }
  639.     public function setDateInscriptionFin(?\DateTimeInterface $dateInscriptionFin): self
  640.     {
  641.         $this->dateInscriptionFin $dateInscriptionFin;
  642.         return $this;
  643.     }
  644.     public function getStatut(): ?string
  645.     {
  646.         return $this->statut;
  647.     }
  648.     public function setStatut(?string $statut): self
  649.     {
  650.         $this->statut $statut;
  651.         return $this;
  652.     }
  653.     public function isSingle(): ?string
  654.     {
  655.         return $this->single;
  656.     }
  657.     public function setSingle(?string $single): self
  658.     {
  659.         $this->single $single;
  660.         return $this;
  661.     }
  662.     public function isAccompagnants(): ?string
  663.     {
  664.         return $this->accompagnants;
  665.     }
  666.     public function setAccompagnants(?string $accompagnants): self
  667.     {
  668.         $this->accompagnants $accompagnants;
  669.         return $this;
  670.     }
  671.     /**
  672.      * @return Collection<int, Inscription>
  673.      */
  674.     public function getInscriptions(): Collection
  675.     {
  676.         return $this->inscriptions;
  677.     }
  678.     public function addInscription(Inscription $inscription): self
  679.     {
  680.         if (!$this->inscriptions->contains($inscription)) {
  681.             $this->inscriptions->add($inscription);
  682.             $inscription->setEcole($this);
  683.         }
  684.         return $this;
  685.     }
  686.     public function removeInscription(Inscription $inscription): self
  687.     {
  688.         if ($this->inscriptions->removeElement($inscription)) {
  689.             // set the owning side to null (unless already changed)
  690.             if ($inscription->getEcole() === $this) {
  691.                 $inscription->setEcole(null);
  692.             }
  693.         }
  694.         return $this;
  695.     }
  696.     public function isValider(): bool
  697.     {
  698.         return $this->statut === self::STATUS_VALIDEE;
  699.     }
  700.     public function __toString(): string
  701.     {
  702.         return $this->getLibelle();
  703.     }
  704.     public function getDatePreInscriptionDebut(): ?\DateTimeInterface
  705.     {
  706.         return $this->datePreInscriptionDebut;
  707.     }
  708.     public function setDatePreInscriptionDebut(?\DateTimeInterface $datePreInscriptionDebut): self
  709.     {
  710.         $this->datePreInscriptionDebut $datePreInscriptionDebut;
  711.         return $this;
  712.     }
  713.     public function getDatePreInscriptionFin(): ?\DateTimeInterface
  714.     {
  715.         return $this->datePreInscriptionFin;
  716.     }
  717.     public function setDatePreInscriptionFin(?\DateTimeInterface $datePreInscriptionFin): self
  718.     {
  719.         $this->datePreInscriptionFin $datePreInscriptionFin;
  720.         return $this;
  721.     }
  722.     public function isGestionnaires(User $user): bool
  723.     {
  724.         return $this->gestionnaires->contains($user);
  725.     }
  726.     public function getDateDefinitiveValideDebut(): ?\DateTimeInterface
  727.     {
  728.         return $this->dateDefinitiveValideDebut;
  729.     }
  730.     public function setDateDefinitiveValideDebut(?\DateTimeInterface $dateDefinitiveValideDebut): self
  731.     {
  732.         $this->dateDefinitiveValideDebut $dateDefinitiveValideDebut;
  733.         return $this;
  734.     }
  735.     public function getDateDefinitiveValideFin(): ?\DateTimeInterface
  736.     {
  737.         return $this->dateDefinitiveValideFin;
  738.     }
  739.     public function setDateDefinitiveValideFin(?\DateTimeInterface $dateDefinitiveValideFin): self
  740.     {
  741.         $this->dateDefinitiveValideFin $dateDefinitiveValideFin;
  742.         return $this;
  743.     }
  744.     public function getNbInscrit(): int
  745.     {
  746.         return $this->inscriptions->count();
  747.     }
  748.     /**
  749.      * @return Collection<int, User>
  750.      */
  751.     public function getGestionnaires(): Collection
  752.     {
  753.         return $this->gestionnaires;
  754.     }
  755.     public function addGestionnaire(User $gestionnaire): self
  756.     {
  757.         if (!$this->gestionnaires->contains($gestionnaire)) {
  758.             $this->gestionnaires->add($gestionnaire);
  759.         }
  760.         return $this;
  761.     }
  762.     public function removeGestionnaire(User $gestionnaire): self
  763.     {
  764.         $this->gestionnaires->removeElement($gestionnaire);
  765.         return $this;
  766.     }
  767.     /**
  768.      * @return Collection<int, EcoleFile>
  769.      */
  770.     public function getFiles(): Collection
  771.     {
  772.         return $this->files;
  773.     }
  774.     public function addFile(EcoleFile $file): self
  775.     {
  776.         if (!$this->files->contains($file)) {
  777.             $this->files->add($file);
  778.             $file->setEcole($this);
  779.         }
  780.         return $this;
  781.     }
  782.     public function removeFile(EcoleFile $file): self
  783.     {
  784.         if ($this->files->removeElement($file)) {
  785.             // set the owning side to null (unless already changed)
  786.             if ($file->getEcole() === $this) {
  787.                 $file->setEcole(null);
  788.             }
  789.         }
  790.         return $this;
  791.     }
  792.     public function getDocumentsInscription(): array
  793.     {
  794.         return $this->documentsInscription;
  795.     }
  796.     public function setDocumentsInscription(?array $documentsInscription): self
  797.     {
  798.         $this->documentsInscription $documentsInscription;
  799.         return $this;
  800.     }
  801. }