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