src/Entity/Profile.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\ProfileRepository;
  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(repositoryClassProfileRepository::class)]
  9. #[ORM\HasLifecycleCallbacks]
  10. class Profile
  11. {
  12.     const PERCENT_STEP_1 25;
  13.     const PERCENT_STEP_2 50;
  14.     const FORMATION_TYPE_INITIAL 1;
  15.     const FORMATION_TYPE_ALTERNANCE 2;
  16.     const QCM_LOCAL 1;
  17.     const QCM_ONLINE 2;
  18.     #[ORM\Id]
  19.     #[ORM\GeneratedValue]
  20.     #[ORM\Column(type'integer')]
  21.     private $id;
  22.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'profiles'cascade: ['persist'])]
  23.     private ?\App\Entity\User $user null;
  24.     #[ORM\ManyToMany(targetEntityProgram::class, inversedBy'profiles')]
  25.     private Collection $programs;
  26.     #[ORM\Column(type'string'length255nullabletrue)]
  27.     private ?string $schoolName null;
  28.     #[ORM\Column(type'string'length255nullabletrue)]
  29.     private ?string $diplomaName null;
  30.     #[ORM\ManyToOne(targetEntityStudyLevel::class, inversedBy'profiles')]
  31.     private ?\App\Entity\StudyLevel $studyLevel null;
  32.     #[ORM\ManyToOne(targetEntityUser::class, inversedBy'profiles')]
  33.     private ?\App\Entity\User $commercial null;
  34.     #[ORM\ManyToOne(targetEntityEnglishLevel::class, inversedBy'profiles')]
  35.     private ?\App\Entity\EnglishLevel $englishLevel null;
  36.     #[ORM\OneToMany(targetEntityProfileFile::class, mappedBy'profile'orphanRemovaltruecascade: ['persist''remove'])]
  37.     private Collection $profileFiles;
  38.     #[ORM\ManyToOne(targetEntityJury::class, inversedBy'profiles')]
  39.     private ?\App\Entity\Jury $jury null;
  40.     #[ORM\ManyToOne(targetEntityOraux::class, inversedBy'profiles')]
  41.     private ?\App\Entity\Oraux $oraux null;
  42.     #[ORM\ManyToOne(targetEntityStatus::class, inversedBy'profiles')]
  43.     private ?\App\Entity\Status $status null;
  44.     #[ORM\ManyToOne(targetEntityCampaign::class, inversedBy'profiles')]
  45.     private ?\App\Entity\Campaign $campaign null;
  46.     #[ORM\OneToMany(targetEntityAppointmentPerson::class, mappedBy'profile'orphanRemovaltrue)]
  47.     private Collection $appointmentPerson;
  48.     #[ORM\ManyToOne(targetEntityProgram::class, inversedBy'selectedProfiles')]
  49.     private ?\App\Entity\Program $selectedProgram null;
  50.     #[ORM\Column(type'json'nullabletrue)]
  51.     private ?array $juryResult = [];
  52.     #[ORM\Column(type'date'nullabletrue)]
  53.     private ?\DateTimeInterface $juryDate null;
  54.     #[ORM\Column(type'json'nullabletrue)]
  55.     private ?array $orauxResult = [];
  56.     #[ORM\Column(type'date'nullabletrue)]
  57.     private ?\DateTimeInterface $orauxDate null;
  58.     #[ORM\OneToMany(targetEntityProfileNote::class, mappedBy'profile'orphanRemovaltruecascade: ['persist''remove'])]
  59.     private Collection $profileNotes;
  60.     #[ORM\Column(type'string'length255nullabletrue)]
  61.     private ?string $year null;
  62.     #[ORM\Column(type'integer'nullabletrue)]
  63.     private ?int $percent null;
  64.     #[ORM\Column(type'json'nullabletrue)]
  65.     private ?array $information = [];
  66.     #[ORM\Column(type'json'nullabletrue)]
  67.     private ?array $marketing = [];
  68.     #[ORM\ManyToOne(targetEntityMediaChannel::class, inversedBy'profiles')]
  69.     private ?\App\Entity\MediaChannel $mediaChannel null;
  70.     #[ORM\ManyToOne(targetEntityLandingpage::class, inversedBy'profiles')]
  71.     private ?\App\Entity\Landingpage $landingpage null;
  72.     #[ORM\OneToMany(targetEntityProfileQcm::class, mappedBy'profile'orphanRemovaltrue)]
  73.     private Collection $profileQcms;
  74.     #[ORM\Column(type'smallint'nullabletrue)]
  75.     private ?int $typeFormation null;
  76.     #[ORM\Column(type'string'length255nullabletrue)]
  77.     private ?string $hostCompany null;
  78.     #[ORM\OneToMany(targetEntityOpenDayPerson::class, mappedBy'profile'orphanRemovaltrue)]
  79.     private Collection $openDayPeople;
  80.     #[ORM\ManyToOne(targetEntityCampus::class, inversedBy'profiles')]
  81.     private ?\App\Entity\Campus $campus null;
  82.     #[ORM\ManyToOne(targetEntityTask::class, inversedBy'profiles')]
  83.     private ?\App\Entity\Task $task null;
  84.     #[ORM\Column(type'date'nullabletrue)]
  85.     private ?\DateTimeInterface $taskDate null;
  86.     #[ORM\Column(type'integer'nullabletrueoptions: ['default' => 0])]
  87.     private ?int $taskStatus null;
  88.     #[ORM\ManyToOne(targetEntityCampus::class)]
  89.     private ?\App\Entity\Campus $campus1 null;
  90.     #[ORM\ManyToOne(targetEntityCampus::class)]
  91.     private ?\App\Entity\Campus $campus2 null;
  92.     #[ORM\ManyToOne(targetEntityCampus::class)]
  93.     private ?\App\Entity\Campus $campus3 null;
  94.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  95.     private ?\App\Entity\Media $fileCv null;
  96.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  97.     private ?\App\Entity\Media $fileLetter null;
  98.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  99.     private ?\App\Entity\Media $fileReportCard1 null;
  100.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  101.     private ?\App\Entity\Media $fileReportCard2 null;
  102.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  103.     private ?\App\Entity\Media $fileReportCard3 null;
  104.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  105.     private ?\App\Entity\Media $fileIdentity null;
  106.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  107.     private ?\App\Entity\Media $fileResidencePermit null;
  108.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  109.     private ?\App\Entity\Media $filePhoto null;
  110.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  111.     private ?\App\Entity\Media $fileHandicap null;
  112.     #[ORM\Column(type'date'nullabletrue)]
  113.     private ?\DateTimeInterface $expireIdentity null;
  114.     #[ORM\Column(type'date'nullabletrue)]
  115.     private ?\DateTimeInterface $expireResidencePermit null;
  116.     #[ORM\Column(type'text'nullabletrue)]
  117.     private ?string $motivation null;
  118.     #[ORM\Column(type'text'nullabletrue)]
  119.     private ?string $admissionMessage null;
  120.     #[ORM\ManyToOne(targetEntityCursus::class)]
  121.     private ?\App\Entity\Cursus $cursus null;
  122.     #[ORM\Column(type'boolean'nullabletrue)]
  123.     private ?bool $isHandicap null;
  124.     #[ORM\Column(type'text'nullabletrue)]
  125.     private ?string $handicapInfo null;
  126.     public function __construct()
  127.     {
  128.         $this->programs = new ArrayCollection();
  129.         $this->profileFiles = new ArrayCollection();
  130.         $this->appointmentPerson = new ArrayCollection();
  131.         $this->profileNotes = new ArrayCollection();
  132.         $this->profileQcms = new ArrayCollection();
  133.         $this->openDayPeople = new ArrayCollection();
  134.         $this->notifications = new ArrayCollection();
  135.     }
  136.     public function getId(): ?int
  137.     {
  138.         return $this->id;
  139.     }
  140.     public function getUser(): ?User
  141.     {
  142.         return $this->user;
  143.     }
  144.     public function setUser(?User $user): self
  145.     {
  146.         $this->user $user;
  147.         return $this;
  148.     }
  149.     /**
  150.      * @return Collection<int, Program>
  151.      */
  152.     public function getPrograms(): Collection
  153.     {
  154.         return $this->programs;
  155.     }
  156.     public function addProgram(Program $program): self
  157.     {
  158.         if (!$this->programs->contains($program)) {
  159.             $this->programs[] = $program;
  160.         }
  161.         return $this;
  162.     }
  163.     public function removeProgram(Program $program): self
  164.     {
  165.         $this->programs->removeElement($program);
  166.         return $this;
  167.     }
  168.     public function getSchoolName(): ?string
  169.     {
  170.         return $this->schoolName;
  171.     }
  172.     public function setSchoolName(?string $schoolName): self
  173.     {
  174.         $this->schoolName $schoolName;
  175.         return $this;
  176.     }
  177.     public function getDiplomaName(): ?string
  178.     {
  179.         return $this->diplomaName;
  180.     }
  181.     public function setDiplomaName(?string $diplomaName): self
  182.     {
  183.         $this->diplomaName $diplomaName;
  184.         return $this;
  185.     }
  186.     public function getStudyLevel(): ?StudyLevel
  187.     {
  188.         return $this->studyLevel;
  189.     }
  190.     public function setStudyLevel(?StudyLevel $studyLevel): self
  191.     {
  192.         $this->studyLevel $studyLevel;
  193.         return $this;
  194.     }
  195.     public function getCommercial(): ?User
  196.     {
  197.         return $this->commercial;
  198.     }
  199.     public function setCommercial(?User $user): self
  200.     {
  201.         $this->commercial $user;
  202.         return $this;
  203.     }
  204.     public function getEnglishLevel(): ?EnglishLevel
  205.     {
  206.         return $this->englishLevel;
  207.     }
  208.     public function setEnglishLevel(?EnglishLevel $englishLevel): self
  209.     {
  210.         $this->englishLevel $englishLevel;
  211.         return $this;
  212.     }
  213.     /**
  214.      * @return Collection<int, ProfileFile>
  215.      */
  216.     public function getProfileFiles(): Collection
  217.     {
  218.         return $this->profileFiles;
  219.     }
  220.     public function addProfileFile(ProfileFile $profileFile): self
  221.     {
  222.         if (!$this->profileFiles->contains($profileFile)) {
  223.             $this->profileFiles[] = $profileFile;
  224.             $profileFile->setProfile($this);
  225.         }
  226.         return $this;
  227.     }
  228.     public function removeProfileFile(ProfileFile $profileFile): self
  229.     {
  230.         if ($this->profileFiles->removeElement($profileFile)) {
  231.             // set the owning side to null (unless already changed)
  232.             if ($profileFile->getProfile() === $this) {
  233.                 $profileFile->setProfile(null);
  234.             }
  235.         }
  236.         return $this;
  237.     }
  238.     public function getJury(): ?Jury
  239.     {
  240.         return $this->jury;
  241.     }
  242.     public function setJury(?Jury $jury): self
  243.     {
  244.         $this->jury $jury;
  245.         return $this;
  246.     }
  247.     public function getOraux(): ?Oraux
  248.     {
  249.         return $this->oraux;
  250.     }
  251.     public function setOraux(?Oraux $oraux): self
  252.     {
  253.         $this->oraux $oraux;
  254.         return $this;
  255.     }
  256.     public function getStatus(): ?Status
  257.     {
  258.         return $this->status;
  259.     }
  260.     public function setStatus(?Status $status): self
  261.     {
  262.         $this->status $status;
  263.         return $this;
  264.     }
  265.     public function getCampaign(): ?Campaign
  266.     {
  267.         return $this->campaign;
  268.     }
  269.     public function setCampaign(?Campaign $campaign): self
  270.     {
  271.         $this->campaign $campaign;
  272.         return $this;
  273.     }
  274.     /**
  275.      * @return Collection<int, AppointmentPerson>
  276.      */
  277.     public function getAppointmentPerson(): Collection
  278.     {
  279.         return $this->appointmentPerson;
  280.     }
  281.     public function addAppointmentPerson(AppointmentPerson $appointmentPerson): self
  282.     {
  283.         if (!$this->appointmentPerson->contains($appointmentPerson)) {
  284.             $this->appointmentPerson[] = $appointmentPerson;
  285.             $appointmentPerson->setProfile($this);
  286.         }
  287.         return $this;
  288.     }
  289.     public function removeAppointmentPerson(AppointmentPerson $appointmentPerson): self
  290.     {
  291.         if ($this->appointmentPerson->removeElement($appointmentPerson)) {
  292.             // set the owning side to null (unless already changed)
  293.             if ($appointmentPerson->getProfile() === $this) {
  294.                 $appointmentPerson->setProfile(null);
  295.             }
  296.         }
  297.         return $this;
  298.     }
  299.     public function getSelectedProgram(): ?Program
  300.     {
  301.         return $this->selectedProgram;
  302.     }
  303.     public function setSelectedProgram(?Program $selectedProgram): self
  304.     {
  305.         $this->selectedProgram $selectedProgram;
  306.         return $this;
  307.     }
  308.     public function getJuryResult(): ?array
  309.     {
  310.         return $this->juryResult;
  311.     }
  312.     public function setJuryResult(?array $juryResult): self
  313.     {
  314.         $this->juryResult $juryResult;
  315.         return $this;
  316.     }
  317.     public function getJuryDate(): ?\DateTimeInterface
  318.     {
  319.         return $this->juryDate;
  320.     }
  321.     public function setJuryDate(?\DateTimeInterface $juryDate): self
  322.     {
  323.         $this->juryDate $juryDate;
  324.         return $this;
  325.     }
  326.     public function getOrauxResult(): ?array
  327.     {
  328.         return $this->orauxResult;
  329.     }
  330.     public function setOrauxResult(?array $orauxResult): self
  331.     {
  332.         $this->orauxResult $orauxResult;
  333.         return $this;
  334.     }
  335.     public function getOrauxDate(): ?\DateTimeInterface
  336.     {
  337.         return $this->orauxDate;
  338.     }
  339.     public function setOrauxDate(?\DateTimeInterface $orauxDate): self
  340.     {
  341.         $this->orauxDate $orauxDate;
  342.         return $this;
  343.     }
  344.     /**
  345.      * @return Collection<int, ProfileNote>
  346.      */
  347.     public function getProfileNotes(): Collection
  348.     {
  349.         return $this->profileNotes;
  350.     }
  351.     public function addProfileNote(ProfileNote $profileNote): self
  352.     {
  353.         if (!$this->profileNotes->contains($profileNote)) {
  354.             $this->profileNotes[] = $profileNote;
  355.             $profileNote->setProfile($this);
  356.         }
  357.         return $this;
  358.     }
  359.     public function removeProfileNote(ProfileNote $profileNote): self
  360.     {
  361.         if ($this->profileNotes->removeElement($profileNote)) {
  362.             // set the owning side to null (unless already changed)
  363.             if ($profileNote->getProfile() === $this) {
  364.                 $profileNote->setProfile(null);
  365.             }
  366.         }
  367.         return $this;
  368.     }
  369.     public function getYear(): ?string
  370.     {
  371.         return $this->year;
  372.     }
  373.     public function setYear(?string $year): self
  374.     {
  375.         $this->year $year;
  376.         return $this;
  377.     }
  378.     public function getPercent(): ?int
  379.     {
  380.         return $this->percent;
  381.     }
  382.     public function setPercent(?int $percent): self
  383.     {
  384.         $this->percent $percent;
  385.         return $this;
  386.     }
  387.     public function getInformation(): ?array
  388.     {
  389.         return $this->information;
  390.     }
  391.     public function setInformation(?array $information): self
  392.     {
  393.         $this->information $information;
  394.         return $this;
  395.     }
  396.     public function getMarketing(): ?array
  397.     {
  398.         return $this->marketing;
  399.     }
  400.     public function setMarketing(?array $marketing): self
  401.     {
  402.         $this->marketing $marketing;
  403.         return $this;
  404.     }
  405.     public function getMediaChannel(): ?MediaChannel
  406.     {
  407.         return $this->mediaChannel;
  408.     }
  409.     public function setMediaChannel(?MediaChannel $mediaChannel): self
  410.     {
  411.         $this->mediaChannel $mediaChannel;
  412.         return $this;
  413.     }
  414.     public function getLandingpage(): ?Landingpage
  415.     {
  416.         return $this->landingpage;
  417.     }
  418.     public function setLandingpage(?Landingpage $landingpage): self
  419.     {
  420.         $this->landingpage $landingpage;
  421.         return $this;
  422.     }
  423.     /**
  424.      * @return Collection<int, ProfileQcm>
  425.      */
  426.     public function getProfileQcms(): Collection
  427.     {
  428.         return $this->profileQcms;
  429.     }
  430.     public function addProfileQcm(ProfileQcm $profileQcm): self
  431.     {
  432.         if (!$this->profileQcms->contains($profileQcm)) {
  433.             $this->profileQcms[] = $profileQcm;
  434.             $profileQcm->setProfile($this);
  435.         }
  436.         return $this;
  437.     }
  438.     public function removeProfileQcm(ProfileQcm $profileQcm): self
  439.     {
  440.         if ($this->profileQcms->removeElement($profileQcm)) {
  441.             // set the owning side to null (unless already changed)
  442.             if ($profileQcm->getProfile() === $this) {
  443.                 $profileQcm->setProfile(null);
  444.             }
  445.         }
  446.         return $this;
  447.     }
  448.     public function getTypeFormation(): ?int
  449.     {
  450.         return $this->typeFormation;
  451.     }
  452.     public function setTypeFormation(?int $typeFormation): self
  453.     {
  454.         $this->typeFormation $typeFormation;
  455.         return $this;
  456.     }
  457.     public function getHostCompany(): ?string
  458.     {
  459.         return $this->hostCompany;
  460.     }
  461.     public function setHostCompany(?string $hostCompany): self
  462.     {
  463.         $this->hostCompany $hostCompany;
  464.         return $this;
  465.     }
  466.     /**
  467.      * @return Collection<int, OpenDayPerson>
  468.      */
  469.     public function getOpenDayPeople(): Collection
  470.     {
  471.         return $this->openDayPeople;
  472.     }
  473.     public function addOpenDayPerson(OpenDayPerson $openDayPerson): self
  474.     {
  475.         if (!$this->openDayPeople->contains($openDayPerson)) {
  476.             $this->openDayPeople[] = $openDayPerson;
  477.             $openDayPerson->setProfile($this);
  478.         }
  479.         return $this;
  480.     }
  481.     public function removeOpenDayPerson(OpenDayPerson $openDayPerson): self
  482.     {
  483.         if ($this->openDayPeople->removeElement($openDayPerson)) {
  484.             // set the owning side to null (unless already changed)
  485.             if ($openDayPerson->getProfile() === $this) {
  486.                 $openDayPerson->setProfile(null);
  487.             }
  488.         }
  489.         return $this;
  490.     }
  491.     public function getCampus(): ?Campus
  492.     {
  493.         return $this->campus;
  494.     }
  495.     public function setCampus(?Campus $campus): self
  496.     {
  497.         $this->campus $campus;
  498.         return $this;
  499.     }
  500.     public function getTask(): ?Task
  501.     {
  502.         return $this->task;
  503.     }
  504.     public function setTask(?Task $task): self
  505.     {
  506.         $this->task $task;
  507.         return $this;
  508.     }
  509.     public function getTaskDate(): ?\DateTimeInterface
  510.     {
  511.         return $this->taskDate;
  512.     }
  513.     public function setTaskDate(?\DateTimeInterface $taskDate): self
  514.     {
  515.         $this->taskDate $taskDate;
  516.         return $this;
  517.     }
  518.     public function getTaskStatus(): ?int
  519.     {
  520.         return $this->taskStatus;
  521.     }
  522.     public function setTaskStatus(?int $taskStatus): self
  523.     {
  524.         $this->taskStatus $taskStatus;
  525.         return $this;
  526.     }
  527.     public function getCampus1(): ?Campus
  528.     {
  529.         return $this->campus1;
  530.     }
  531.     public function setCampus1(?Campus $campus1): self
  532.     {
  533.         $this->campus1 $campus1;
  534.         return $this;
  535.     }
  536.     public function getCampus2(): ?Campus
  537.     {
  538.         return $this->campus2;
  539.     }
  540.     public function setCampus2(?Campus $campus2): self
  541.     {
  542.         $this->campus2 $campus2;
  543.         return $this;
  544.     }
  545.     public function getCampus3(): ?Campus
  546.     {
  547.         return $this->campus3;
  548.     }
  549.     public function setCampus3(?Campus $campus3): self
  550.     {
  551.         $this->campus3 $campus3;
  552.         return $this;
  553.     }
  554.     public function getFileCv(): ?Media
  555.     {
  556.         return $this->fileCv;
  557.     }
  558.     public function setFileCv(?Media $fileCv): self
  559.     {
  560.         $this->fileCv $fileCv;
  561.         return $this;
  562.     }
  563.     public function getFileLetter(): ?Media
  564.     {
  565.         return $this->fileLetter;
  566.     }
  567.     public function setFileLetter(?Media $fileLetter): self
  568.     {
  569.         $this->fileLetter $fileLetter;
  570.         return $this;
  571.     }
  572.     public function getFileReportCard1(): ?Media
  573.     {
  574.         return $this->fileReportCard1;
  575.     }
  576.     public function setFileReportCard1(?Media $fileReportCard1): self
  577.     {
  578.         $this->fileReportCard1 $fileReportCard1;
  579.         return $this;
  580.     }
  581.     public function getFileReportCard2(): ?Media
  582.     {
  583.         return $this->fileReportCard2;
  584.     }
  585.     public function setFileReportCard2(?Media $fileReportCard2): self
  586.     {
  587.         $this->fileReportCard2 $fileReportCard2;
  588.         return $this;
  589.     }
  590.     public function getFileReportCard3(): ?Media
  591.     {
  592.         return $this->fileReportCard3;
  593.     }
  594.     public function setFileReportCard3(?Media $fileReportCard3): self
  595.     {
  596.         $this->fileReportCard3 $fileReportCard3;
  597.         return $this;
  598.     }
  599.     public function getFileIdentity(): ?Media
  600.     {
  601.         return $this->fileIdentity;
  602.     }
  603.     public function setFileIdentity(?Media $fileIdentity): self
  604.     {
  605.         $this->fileIdentity $fileIdentity;
  606.         return $this;
  607.     }
  608.     public function getFileResidencePermit(): ?Media
  609.     {
  610.         return $this->fileResidencePermit;
  611.     }
  612.     public function setFileResidencePermit(?Media $fileResidencePermit): self
  613.     {
  614.         $this->fileResidencePermit $fileResidencePermit;
  615.         return $this;
  616.     }
  617.     public function getFilePhoto(): ?Media
  618.     {
  619.         return $this->filePhoto;
  620.     }
  621.     public function setFilePhoto(?Media $filePhoto): self
  622.     {
  623.         $this->filePhoto $filePhoto;
  624.         return $this;
  625.     }
  626.     public function getFileHandicap(): ?Media
  627.     {
  628.         return $this->fileHandicap;
  629.     }
  630.     public function setFileHandicap(?Media $fileHandicap): self
  631.     {
  632.         $this->fileHandicap $fileHandicap;
  633.         return $this;
  634.     }
  635.     public function getExpireIdentity(): ?\DateTimeInterface
  636.     {
  637.         return $this->expireIdentity;
  638.     }
  639.     public function setExpireIdentity(?\DateTimeInterface $expireIdentity): self
  640.     {
  641.         $this->expireIdentity $expireIdentity;
  642.         return $this;
  643.     }
  644.     public function getExpireResidencePermit(): ?\DateTimeInterface
  645.     {
  646.         return $this->expireResidencePermit;
  647.     }
  648.     public function setExpireResidencePermit(?\DateTimeInterface $expireResidencePermit): self
  649.     {
  650.         $this->expireResidencePermit $expireResidencePermit;
  651.         return $this;
  652.     }
  653.     public function getMotivation(): ?string
  654.     {
  655.         return $this->motivation;
  656.     }
  657.     public function setMotivation(?string $motivation): self
  658.     {
  659.         $this->motivation $motivation;
  660.         return $this;
  661.     }
  662.     public function getAdmissionMessage(): ?string
  663.     {
  664.         return $this->admissionMessage;
  665.     }
  666.     public function setAdmissionMessage(?string $admissionMessage): self
  667.     {
  668.         $this->admissionMessage $admissionMessage;
  669.         return $this;
  670.     }
  671.     public function getCursus(): ?Cursus
  672.     {
  673.         return $this->cursus;
  674.     }
  675.     public function setCursus(?Cursus $cursus): self
  676.     {
  677.         $this->cursus $cursus;
  678.         return $this;
  679.     }
  680.     public function getIsHandicap(): ?bool
  681.     {
  682.         return $this->isHandicap;
  683.     }
  684.     public function setIsHandicap(?bool $isHandicap): self
  685.     {
  686.         $this->isHandicap $isHandicap;
  687.         return $this;
  688.     }
  689.     public function getHandicapInfo(): ?string
  690.     {
  691.         return $this->handicapInfo;
  692.     }
  693.     public function setHandicapInfo(?string $handicapInfo): self
  694.     {
  695.         $this->handicapInfo $handicapInfo;
  696.         return $this;
  697.     }
  698.     public function calculateProfilePercent()
  699.     {
  700.         $percent 25;
  701.         $info $this->getInformation();
  702.         if (
  703.             !empty($this->getStudyLevel())
  704.             || (!empty($info)
  705.                 && (!empty($info['previousSchool'])
  706.                     || !empty($info['previousDegree'])
  707.                     || !empty($info['previousDegreeYear'])
  708.                     || !empty($info['previousDegreeDescription'])
  709.                     || !empty($info['currentDegree'])
  710.                     || !empty($info['currentDegreeYear'])
  711.                     || !empty($info['currentDegreeDescription'])
  712.                 )
  713.             )
  714.         ) {
  715.             $percent += 25;
  716.         }
  717.         if (!empty($this->getFileCv())) {
  718.             $percent += 25;
  719.         }
  720.         if (
  721.             !empty($this->getFileReportCard1())
  722.             || !empty($this->getFileReportCard2())
  723.             || !empty($this->getFileReportCard3())
  724.             || !empty($this->getFileIdentity())
  725.             || !empty($this->getFileResidencePermit())
  726.             || !empty($this->getFilePhoto())
  727.             || !empty($this->getFileHandicap())
  728.             || !empty($this->getFileReportCard2())
  729.             || !empty($this->getFileReportCard2())
  730.         ) {
  731.             $percent += 25;
  732.         }
  733.         $this->setPercent($percent);
  734.     }
  735.     #[ORM\Column(type'datetime'nullabletrue)]
  736.     private \DateTimeInterface|null|\DateTime $createdDate null;
  737.     #[ORM\Column(type'datetime'nullabletrue)]
  738.     private $updatedDate;
  739.     #[ORM\Column(type'json'nullabletrue)]
  740.     private ?array $entreprise = [];
  741.     #[ORM\Column(type'json'nullabletrue)]
  742.     private ?array $contract = [];
  743.     #[ORM\Column(type'string'length255nullabletrue)]
  744.     private ?string $ficheEmail null;
  745.     #[ORM\OneToMany(targetEntityNotification::class, mappedBy'profile'orphanRemovaltruecascade: ['persist''remove'])]
  746.     private Collection $notifications;
  747.     #[ORM\Column(type'json'nullabletrue)]
  748.     private ?array $qcmResults = [];
  749.     #[ORM\Column(type'string'length255nullabletrue)]
  750.     private ?string $qcmToken null;
  751.     #[ORM\Column(type'boolean'nullabletrue)]
  752.     private ?bool $isDuplicate null;
  753.     #[ORM\Column(type'boolean'nullabletrue)]
  754.     private ?bool $repay null;
  755.     #[ORM\Column(type'datetime'nullabletrue)]
  756.     private ?\DateTimeInterface $abandonDate null;
  757.     #[ORM\Column(type'text'nullabletrue)]
  758.     private ?string $abandonNote null;
  759.     #[ORM\Column(type'integer'nullabletrue)]
  760.     private ?int $paymentMethod null;
  761.     #[ORM\Column(type'datetime'nullabletrue)]
  762.     private ?\DateTimeInterface $paymentDate null;
  763.     #[ORM\Column(type'integer'nullabletrue)]
  764.     private ?int $qcmMethod null;
  765.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  766.     private ?\App\Entity\Media $fileDiplome null;
  767.     #[ORM\Column(nullabletrue)]
  768.     private ?bool $isSent null;
  769.     #[ORM\Column(typeTypes::DATETIME_MUTABLEnullabletrue)]
  770.     private ?\DateTimeInterface $enrolledDate null;
  771.     #[ORM\Column(nullabletrue)]
  772.     private ?int $trainingOption null;
  773.     public function getCreatedDate(): ?\DateTimeInterface
  774.     {
  775.         return $this->createdDate;
  776.     }
  777.     public function setCreatedDate(?\DateTimeInterface $createdDate): self
  778.     {
  779.         $this->createdDate $createdDate;
  780.         return $this;
  781.     }
  782.     public function getUpdatedDate(): ?\DateTimeInterface
  783.     {
  784.         return $this->updatedDate;
  785.     }
  786.     public function setUpdatedDate(?\DateTimeInterface $updatedDate): self
  787.     {
  788.         $this->updatedDate $updatedDate;
  789.         return $this;
  790.     }
  791.     /**
  792.      * Gets triggered only on insert
  793.      */
  794.     #[ORM\PrePersist]
  795.     public function onPrePersist()
  796.     {
  797.         if (!$this->createdDate) {
  798.             $this->createdDate = new \DateTime('now');
  799.         }
  800.         if (!$this->updatedDate) {
  801.             $this->updatedDate $this->createdDate;
  802.         }
  803.         $this->calculateProfilePercent();
  804.     }
  805.     /**
  806.      * Gets triggered every time on update
  807.      */
  808.     #[ORM\PreUpdate]
  809.     public function onPreUpdate()
  810.     {
  811.         $this->updatedDate = new \DateTime("now");
  812.         $this->calculateProfilePercent();
  813.     }
  814.     public function getEntreprise(): ?array
  815.     {
  816.         return $this->entreprise;
  817.     }
  818.     public function setEntreprise(?array $entreprise): self
  819.     {
  820.         $this->entreprise $entreprise;
  821.         return $this;
  822.     }
  823.     public function getContract(): ?array
  824.     {
  825.         return $this->contract;
  826.     }
  827.     public function setContract(?array $contract): self
  828.     {
  829.         $this->contract $contract;
  830.         return $this;
  831.     }
  832.     public function getFicheEmail(): ?string
  833.     {
  834.         return $this->ficheEmail;
  835.     }
  836.     public function setFicheEmail(?string $ficheEmail): self
  837.     {
  838.         $this->ficheEmail $ficheEmail;
  839.         return $this;
  840.     }
  841.     /**
  842.      * @return Collection<int, Notification>
  843.      */
  844.     public function getNotifications(): Collection
  845.     {
  846.         return $this->notifications;
  847.     }
  848.     public function addNotification(Notification $notification): self
  849.     {
  850.         if (!$this->notifications->contains($notification)) {
  851.             $this->notifications[] = $notification;
  852.             $notification->setProfile($this);
  853.         }
  854.         return $this;
  855.     }
  856.     public function removeNotification(Notification $notification): self
  857.     {
  858.         if ($this->notifications->removeElement($notification)) {
  859.             // set the owning side to null (unless already changed)
  860.             if ($notification->getProfile() === $this) {
  861.                 $notification->setProfile(null);
  862.             }
  863.         }
  864.         return $this;
  865.     }
  866.     public function getQcmResults(): ?array
  867.     {
  868.         return $this->qcmResults;
  869.     }
  870.     public function setQcmResults(?array $qcmResults): self
  871.     {
  872.         $this->qcmResults $qcmResults;
  873.         return $this;
  874.     }
  875.     public function getQcmToken(): ?string
  876.     {
  877.         return $this->qcmToken;
  878.     }
  879.     public function setQcmToken(?string $qcmToken): self
  880.     {
  881.         $this->qcmToken $qcmToken;
  882.         return $this;
  883.     }
  884.     public function getIsDuplicate(): ?bool
  885.     {
  886.         return $this->isDuplicate;
  887.     }
  888.     public function setIsDuplicate(?bool $isDuplicate): self
  889.     {
  890.         $this->isDuplicate $isDuplicate;
  891.         return $this;
  892.     }
  893.     public function getRepay(): ?bool
  894.     {
  895.         return $this->repay;
  896.     }
  897.     public function setRepay(?bool $repay): self
  898.     {
  899.         $this->repay $repay;
  900.         return $this;
  901.     }
  902.     public function getAbandonDate(): ?\DateTimeInterface
  903.     {
  904.         return $this->abandonDate;
  905.     }
  906.     public function setAbandonDate(?\DateTimeInterface $abandonDate): self
  907.     {
  908.         $this->abandonDate $abandonDate;
  909.         return $this;
  910.     }
  911.     public function getAbandonNote(): ?string
  912.     {
  913.         return $this->abandonNote;
  914.     }
  915.     public function setAbandonNote(?string $abandonNote): self
  916.     {
  917.         $this->abandonNote $abandonNote;
  918.         return $this;
  919.     }
  920.     public function getPaymentMethod(): ?int
  921.     {
  922.         return $this->paymentMethod;
  923.     }
  924.     public function setPaymentMethod(?int $paymentMethod): self
  925.     {
  926.         $this->paymentMethod $paymentMethod;
  927.         return $this;
  928.     }
  929.     public function getPaymentDate(): ?\DateTimeInterface
  930.     {
  931.         return $this->paymentDate;
  932.     }
  933.     public function setPaymentDate(?\DateTimeInterface $paymentDate): self
  934.     {
  935.         $this->paymentDate $paymentDate;
  936.         return $this;
  937.     }
  938.     public function getQcmMethod(): ?int
  939.     {
  940.         return $this->qcmMethod;
  941.     }
  942.     public function setQcmMethod(?int $qcmMethod): self
  943.     {
  944.         $this->qcmMethod $qcmMethod;
  945.         return $this;
  946.     }
  947.     public function getFileDiplome(): ?Media
  948.     {
  949.         return $this->fileDiplome;
  950.     }
  951.     public function setFileDiplome(?Media $fileDiplome): self
  952.     {
  953.         $this->fileDiplome $fileDiplome;
  954.         return $this;
  955.     }
  956.     public function isIsSent(): ?bool
  957.     {
  958.         return $this->isSent;
  959.     }
  960.     public function setIsSent(?bool $isSent): static
  961.     {
  962.         $this->isSent $isSent;
  963.         return $this;
  964.     }
  965.     public function getEnrolledDate(): ?\DateTimeInterface
  966.     {
  967.         return $this->enrolledDate;
  968.     }
  969.     public function setEnrolledDate(?\DateTimeInterface $enrolledDate): static
  970.     {
  971.         $this->enrolledDate $enrolledDate;
  972.         return $this;
  973.     }
  974.     public function getTrainingOption(): ?int
  975.     {
  976.         return $this->trainingOption;
  977.     }
  978.     public function setTrainingOption(?int $trainingOption): static
  979.     {
  980.         $this->trainingOption $trainingOption;
  981.         return $this;
  982.     }
  983. }