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.     #[ORM\Column(nullabletrue)]
  774.     private ?int $primo null;
  775.     #[ORM\Column(nullabletrue)]
  776.     private ?bool $isAgent null;
  777.     #[ORM\OneToOne(targetEntityMedia::class, cascade: ['persist''remove'])]
  778.     private ?\App\Entity\Media $fileSupportDocument null;
  779.     public function getCreatedDate(): ?\DateTimeInterface
  780.     {
  781.         return $this->createdDate;
  782.     }
  783.     public function setCreatedDate(?\DateTimeInterface $createdDate): self
  784.     {
  785.         $this->createdDate $createdDate;
  786.         return $this;
  787.     }
  788.     public function getUpdatedDate(): ?\DateTimeInterface
  789.     {
  790.         return $this->updatedDate;
  791.     }
  792.     public function setUpdatedDate(?\DateTimeInterface $updatedDate): self
  793.     {
  794.         $this->updatedDate $updatedDate;
  795.         return $this;
  796.     }
  797.     /**
  798.      * Gets triggered only on insert
  799.      */
  800.     #[ORM\PrePersist]
  801.     public function onPrePersist()
  802.     {
  803.         if (!$this->createdDate) {
  804.             $this->createdDate = new \DateTime('now');
  805.         }
  806.         if (!$this->updatedDate) {
  807.             $this->updatedDate $this->createdDate;
  808.         }
  809.         $this->calculateProfilePercent();
  810.     }
  811.     /**
  812.      * Gets triggered every time on update
  813.      */
  814.     #[ORM\PreUpdate]
  815.     public function onPreUpdate()
  816.     {
  817.         $this->updatedDate = new \DateTime("now");
  818.         $this->calculateProfilePercent();
  819.     }
  820.     public function getEntreprise(): ?array
  821.     {
  822.         return $this->entreprise;
  823.     }
  824.     public function setEntreprise(?array $entreprise): self
  825.     {
  826.         $this->entreprise $entreprise;
  827.         return $this;
  828.     }
  829.     public function getContract(): ?array
  830.     {
  831.         return $this->contract;
  832.     }
  833.     public function setContract(?array $contract): self
  834.     {
  835.         $this->contract $contract;
  836.         return $this;
  837.     }
  838.     public function getFicheEmail(): ?string
  839.     {
  840.         return $this->ficheEmail;
  841.     }
  842.     public function setFicheEmail(?string $ficheEmail): self
  843.     {
  844.         $this->ficheEmail $ficheEmail;
  845.         return $this;
  846.     }
  847.     /**
  848.      * @return Collection<int, Notification>
  849.      */
  850.     public function getNotifications(): Collection
  851.     {
  852.         return $this->notifications;
  853.     }
  854.     public function addNotification(Notification $notification): self
  855.     {
  856.         if (!$this->notifications->contains($notification)) {
  857.             $this->notifications[] = $notification;
  858.             $notification->setProfile($this);
  859.         }
  860.         return $this;
  861.     }
  862.     public function removeNotification(Notification $notification): self
  863.     {
  864.         if ($this->notifications->removeElement($notification)) {
  865.             // set the owning side to null (unless already changed)
  866.             if ($notification->getProfile() === $this) {
  867.                 $notification->setProfile(null);
  868.             }
  869.         }
  870.         return $this;
  871.     }
  872.     public function getQcmResults(): ?array
  873.     {
  874.         return $this->qcmResults;
  875.     }
  876.     public function setQcmResults(?array $qcmResults): self
  877.     {
  878.         $this->qcmResults $qcmResults;
  879.         return $this;
  880.     }
  881.     public function getQcmToken(): ?string
  882.     {
  883.         return $this->qcmToken;
  884.     }
  885.     public function setQcmToken(?string $qcmToken): self
  886.     {
  887.         $this->qcmToken $qcmToken;
  888.         return $this;
  889.     }
  890.     public function getIsDuplicate(): ?bool
  891.     {
  892.         return $this->isDuplicate;
  893.     }
  894.     public function setIsDuplicate(?bool $isDuplicate): self
  895.     {
  896.         $this->isDuplicate $isDuplicate;
  897.         return $this;
  898.     }
  899.     public function getRepay(): ?bool
  900.     {
  901.         return $this->repay;
  902.     }
  903.     public function setRepay(?bool $repay): self
  904.     {
  905.         $this->repay $repay;
  906.         return $this;
  907.     }
  908.     public function getAbandonDate(): ?\DateTimeInterface
  909.     {
  910.         return $this->abandonDate;
  911.     }
  912.     public function setAbandonDate(?\DateTimeInterface $abandonDate): self
  913.     {
  914.         $this->abandonDate $abandonDate;
  915.         return $this;
  916.     }
  917.     public function getAbandonNote(): ?string
  918.     {
  919.         return $this->abandonNote;
  920.     }
  921.     public function setAbandonNote(?string $abandonNote): self
  922.     {
  923.         $this->abandonNote $abandonNote;
  924.         return $this;
  925.     }
  926.     public function getPaymentMethod(): ?int
  927.     {
  928.         return $this->paymentMethod;
  929.     }
  930.     public function setPaymentMethod(?int $paymentMethod): self
  931.     {
  932.         $this->paymentMethod $paymentMethod;
  933.         return $this;
  934.     }
  935.     public function getPaymentDate(): ?\DateTimeInterface
  936.     {
  937.         return $this->paymentDate;
  938.     }
  939.     public function setPaymentDate(?\DateTimeInterface $paymentDate): self
  940.     {
  941.         $this->paymentDate $paymentDate;
  942.         return $this;
  943.     }
  944.     public function getQcmMethod(): ?int
  945.     {
  946.         return $this->qcmMethod;
  947.     }
  948.     public function setQcmMethod(?int $qcmMethod): self
  949.     {
  950.         $this->qcmMethod $qcmMethod;
  951.         return $this;
  952.     }
  953.     public function getFileDiplome(): ?Media
  954.     {
  955.         return $this->fileDiplome;
  956.     }
  957.     public function setFileDiplome(?Media $fileDiplome): self
  958.     {
  959.         $this->fileDiplome $fileDiplome;
  960.         return $this;
  961.     }
  962.     public function isIsSent(): ?bool
  963.     {
  964.         return $this->isSent;
  965.     }
  966.     public function setIsSent(?bool $isSent): static
  967.     {
  968.         $this->isSent $isSent;
  969.         return $this;
  970.     }
  971.     public function getEnrolledDate(): ?\DateTimeInterface
  972.     {
  973.         return $this->enrolledDate;
  974.     }
  975.     public function setEnrolledDate(?\DateTimeInterface $enrolledDate): static
  976.     {
  977.         $this->enrolledDate $enrolledDate;
  978.         return $this;
  979.     }
  980.     public function getTrainingOption(): ?int
  981.     {
  982.         return $this->trainingOption;
  983.     }
  984.     public function setTrainingOption(?int $trainingOption): static
  985.     {
  986.         $this->trainingOption $trainingOption;
  987.         return $this;
  988.     }
  989.     public function getPrimo(): ?int
  990.     {
  991.         return $this->primo;
  992.     }
  993.     public function setPrimo(?int $primo): static
  994.     {
  995.         $this->primo $primo;
  996.         return $this;
  997.     }
  998.     public function isIsAgent(): ?bool
  999.     {
  1000.         return $this->isAgent;
  1001.     }
  1002.     public function setIsAgent(?bool $isAgent): static
  1003.     {
  1004.         $this->isAgent $isAgent;
  1005.         return $this;
  1006.     }
  1007.     public function getFileSupportDocument(): ?Media
  1008.     {
  1009.         return $this->fileSupportDocument;
  1010.     }
  1011.     public function setFileSupportDocument(?Media $fileSupportDocument): static
  1012.     {
  1013.         $this->fileSupportDocument $fileSupportDocument;
  1014.         return $this;
  1015.     }
  1016. }