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