src/Entity/User.php line 43

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Configuration\School\Cursus;
  4. use App\Entity\RecruterDreaminJob\Annonce;
  5. use App\Entity\RecruterDreaminJob\InterviewUserFavorite;
  6. use App\Entity\RecruterDreaminJob\Society;
  7. use Doctrine\ORM\Mapping as ORM;
  8. use App\Entity\Configuration\Tag;
  9. use App\Entity\Configuration\Site;
  10. use App\Repository\UserRepository;
  11. use App\Entity\Configuration\Tools;
  12. use App\Entity\Configuration\Rhythm;
  13. use App\Entity\JobConfiguration\Job;
  14. use App\Entity\Configuration\Language;
  15. use App\Entity\Configuration\JobContract;
  16. use App\Entity\Configuration\School\Level;
  17. use App\Entity\Configuration\School\School;
  18. use Doctrine\Common\Collections\Collection;
  19. use App\Entity\JobConfiguration\JobCategory;
  20. use App\Entity\RecruterDreaminJob\UserSociety;
  21. use App\Entity\RecruterDreaminJob\Interview;
  22. use App\Entity\Quiz\RiasecBigFive\UserRBStep;
  23. use App\Entity\Configuration\School\Curriculum;
  24. use App\Entity\JobConfiguration\JobSubCategory;
  25. use App\Entity\Configuration\AssocLanguageLevel;
  26. use App\Entity\Profil\ProfilNegativeDescription;
  27. use App\Entity\Profil\ProfilPositiveDescription;
  28. use Doctrine\Common\Collections\ArrayCollection;
  29. use Symfony\Component\Serializer\Annotation\Groups;
  30. use Symfony\Component\Security\Core\User\UserInterface;
  31. use App\Entity\Configuration\School\Formation\Formation;
  32. use App\Entity\JobConfiguration\Job\Favorites\Favorites;
  33. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  34. /**
  35.  * @ORM\Entity(repositoryClass=UserRepository::class)
  36.  * @ORM\Table(name="`user`")
  37.  * @ORM\HasLifecycleCallbacks()
  38.  */
  39. class User implements UserInterfacePasswordAuthenticatedUserInterface
  40. {
  41.     
  42.     // ###############
  43.     // ## Constants ##
  44.     // ###############
  45.     
  46.     const ROLE_ADMIN "ROLE_ADMIN";
  47.     
  48.     const ROLE_USER "ROLE_USER";
  49.     
  50.     const ROLE_TEST "ROLE_TEST";
  51.     
  52.     const ROLE_INTERVENING "ROLE_INTERVENING";
  53.     const ROLE_RECRUTER "ROLE_RECRUTEUR";
  54.     
  55.     const ROLE_SCHOOL_ADMIN "ROLE_SCHOOL_ADMIN";
  56.     
  57.     const ROLES_LABEL = [
  58.                                                                                                self::ROLE_ADMIN => 'Administrateur',
  59.                                                                                                self::ROLE_USER => 'Etudiant',
  60.                                                                                                self::ROLE_INTERVENING => "Intervenant",
  61.                                                                                                self::ROLE_TEST => "Test",
  62.                                                                                                self::ROLE_RECRUTER => "Recruteur",
  63.                                                                                                self::ROLE_SCHOOL_ADMIN => "Ecole"
  64.                                                                                            ];
  65.     
  66.     const ROLES = [
  67.                                                                                   [
  68.                                                                                       "role" => self::ROLE_ADMIN,
  69.                                                                                       "label" => self::ROLES_LABEL[self::ROLE_ADMIN]
  70.                                                                                   ],
  71.                                                                                   [
  72.                                                                                   "role" => self::ROLE_INTERVENING,
  73.                                                                                   "label" => self::ROLES_LABEL[self::ROLE_INTERVENING]
  74.                                                                                   ],
  75.                                                                                   [
  76.                                                                                       "role" => self::ROLE_USER,
  77.                                                                                       "label" => self::ROLES_LABEL[self::ROLE_USER]
  78.                                                                                   ],
  79.                                                                                   [
  80.                                                                                       "role" => self::ROLE_SCHOOL_ADMIN,
  81.                                                                                       "label" => self::ROLES_LABEL[self::ROLE_SCHOOL_ADMIN]
  82.                                                                                   ],
  83.                                                                                   [
  84.                                                                                       "role" => self::ROLE_RECRUTER,
  85.                                                                                       "label" => self::ROLES_LABEL[self::ROLE_RECRUTER]
  86.                                                                                   ]
  87.                                                                               ];
  88.                                                                                                
  89.     const ANIMAL_NICKNAME_MALE "m";
  90.     
  91.     const ANIMAL_NICKNAME_FEMALE "f";
  92.     
  93.     use EntityIdentifier;
  94.     
  95.     use DateTrait;
  96.     
  97.     /**
  98.      * @ORM\Id
  99.      * @ORM\GeneratedValue
  100.      * @ORM\Column(type="integer")
  101.      * @Groups({"curriculum"})
  102.      */
  103.     private $id;
  104.     /**
  105.      * @ORM\Column(type="string", length=180, unique=true)
  106.      * @Groups({"curriculum"})
  107.      */
  108.     private $email;
  109.     /**
  110.      * @ORM\Column(type="json")
  111.      */
  112.     private $roles = [];
  113.     /**
  114.      * @var string The hashed password
  115.      * @ORM\Column(type="string")
  116.      */
  117.     private $password;
  118.     /**
  119.      * @ORM\Column(type="string", length=255, nullable=true)
  120.      */
  121.     private $avatar;
  122.     /**
  123.      * @ORM\Column(type="string", length=255, nullable=true)
  124.      */
  125.     private $lastname;
  126.     /**
  127.      * @ORM\Column(type="string", length=255, nullable=true)
  128.      */
  129.     private $firstname;
  130.     /**
  131.      * @ORM\Column(type="string", length=255, nullable=true)
  132.      */
  133.     private $phone;
  134.     /**
  135.      * @ORM\OneToMany(targetEntity=UserRiasecResponse::class, mappedBy="user")
  136.      */
  137.     private $userRiasecResponses;
  138.     /**
  139.      * @ORM\OneToMany(targetEntity=RiasecInvitationAccess::class, mappedBy="user")
  140.      */
  141.     private $riasecInvitationAccesses;
  142.     /**
  143.      * @ORM\OneToMany(targetEntity=Favorites::class, mappedBy="user")
  144.      */
  145.     private $favorites;
  146.     /**
  147.      * @ORM\Column(type="date", nullable=true)
  148.      */
  149.     private $dateOfBirth;
  150.     /**
  151.      * @ORM\Column(type="string", length=255, nullable=true)
  152.      */
  153.     private $cityOfSchool
  154.     /**
  155.      * @ORM\ManyToOne(targetEntity=School::class, inversedBy="users")
  156.      */
  157.     private $school;
  158.     /**
  159.      * @ORM\ManyToOne(targetEntity=Level::class, inversedBy="users")
  160.      */
  161.     private $schoolLevel;
  162.     /**
  163.      * @ORM\Column(type="string", length=255, nullable=true)
  164.      */
  165.     private $linkedin;
  166.     /**
  167.      * @ORM\Column(type="string", length=255, nullable=true)
  168.      */
  169.     private $cv;
  170.     /**
  171.      * @ORM\ManyToMany(targetEntity=Language::class, inversedBy="users", cascade={"persist"})
  172.      */
  173.     private $languages;
  174.     /**
  175.      * @ORM\ManyToMany(targetEntity=Tools::class, inversedBy="users", cascade={"persist"})
  176.      */
  177.     private $tools;
  178.     /**
  179.      * @ORM\ManyToOne(targetEntity=JobContract::class, inversedBy="users")
  180.      */
  181.     private $jobContract;
  182.     /**
  183.      * @ORM\Column(type="integer", nullable=true)
  184.      */
  185.     private $contractDuration;
  186.     /**
  187.      * @ORM\Column(type="string", length=255, nullable=true)
  188.      */
  189.     private $startJob;
  190.     /**
  191.      * @ORM\OneToMany(targetEntity=UserIkigaiResponse::class, mappedBy="user")
  192.      */
  193.     private $userIkigaiResponses;
  194.     /**
  195.      * @ORM\OneToMany(targetEntity=LinkedinProfile::class, mappedBy="user")
  196.      */
  197.     private $linkedinProfiles;
  198.     /**
  199.      * @ORM\OneToMany(targetEntity=UserStep::class, mappedBy="user")
  200.      */
  201.     private $userSteps;
  202.     /**
  203.      * @ORM\ManyToMany(targetEntity=Tag::class, inversedBy="users")
  204.      */
  205.     private $tags;
  206.     /**
  207.      * @ORM\Column(type="string", length=255, nullable=true)
  208.      */
  209.     private $studentEmail;
  210.     /**
  211.      * @ORM\Column(type="array", nullable=true)
  212.      */
  213.     private $citiesOfJob = [];
  214.     /**
  215.      * @ORM\Column(type="date", nullable=true)
  216.      */
  217.     private $lastConnection;
  218.     /**
  219.      * @ORM\OneToMany(targetEntity=UserAccessToken::class, mappedBy="user")
  220.      */
  221.     private $userAccessTokens;
  222.     /**
  223.      * @ORM\ManyToMany(targetEntity=JobSubCategory::class, inversedBy="students")
  224.      */
  225.     private $studentFormations;
  226.     /**
  227.      * @ORM\ManyToMany(targetEntity=ProfilPositiveDescription::class, inversedBy="users")
  228.      */
  229.     private $positiveDescriptionChoices;
  230.     /**
  231.      * @ORM\ManyToMany(targetEntity=ProfilNegativeDescription::class, inversedBy="users")
  232.      */
  233.     private $negativeDescriptionChoices;
  234.     /**
  235.      * @ORM\Column(type="boolean", nullable=true)
  236.      */
  237.     private $showAllJob;
  238.     /**
  239.      * @ORM\ManyToMany(targetEntity=Site::class, inversedBy="users")
  240.      */
  241.     private $sites;
  242.     /**
  243.      * @ORM\Column(type="boolean", nullable=true, options={"default"=1})
  244.      */
  245.     private $firstConnexion;
  246.     /**
  247.      * @ORM\Column(type="string", length=255, nullable=true)
  248.      */
  249.     private $animalNickname;
  250.     /**
  251.      * @ORM\OneToMany(targetEntity=UserRBQuizResponse::class, mappedBy="user")
  252.      */
  253.     private $userRBQuizResponses;
  254.     /**
  255.      * @ORM\OneToMany(targetEntity=UserRBStep::class, mappedBy="user")
  256.      */
  257.     private $userRBSteps;
  258.     /**
  259.      * @ORM\Column(type="string", length=255, nullable=true)
  260.      */
  261.     private $animalNickNameSex;
  262.     /**
  263.      * @ORM\ManyToMany(targetEntity=QualityProgress::class, inversedBy="qualitiesUsers")
  264.      * @ORM\JoinTable(name="user_qualities")
  265.      */
  266.     private $qualities;
  267.     /**
  268.      * @ORM\ManyToMany(targetEntity=QualityProgress::class, inversedBy="progressUsers")
  269.      * @ORM\JoinTable(name="user_progress")
  270.      */
  271.     private $progress;
  272.     /**
  273.      * @ORM\Column(type="boolean", nullable=true)
  274.      */
  275.     private $stepAvatarDone;
  276.     /**
  277.      * @ORM\Column(type="boolean", nullable=true)
  278.      */
  279.     private $acceptAvatar;
  280.     /**
  281.      * @ORM\Column(type="string", length=255, nullable=true)
  282.      */
  283.     private $phoneCode;
  284.     /**
  285.      * @ORM\Column(type="string", length=255, nullable=true)
  286.      */
  287.     private $address;
  288.     /**
  289.      * @ORM\Column(type="boolean", nullable=true)
  290.      */
  291.     private $haveDrivingLicense;
  292.     /**
  293.      * @ORM\ManyToMany(targetEntity=AssocLanguageLevel::class, inversedBy="users")
  294.      */
  295.     private $assocLanguageLevels;
  296.     /**
  297.      * @ORM\ManyToOne(targetEntity=Curriculum::class, inversedBy="users")
  298.      */
  299.     private $curriculum;
  300.     /**
  301.      * @ORM\ManyToMany(targetEntity=Job::class, inversedBy="usersWithThisJobAsExperiences")
  302.      */
  303.     private $experiencesJob;
  304.     /**
  305.      * @ORM\ManyToOne(targetEntity=Rhythm::class, inversedBy="users")
  306.      */
  307.     private $rhythm;
  308.     /**
  309.      * @ORM\OneToMany(targetEntity=AssocUserJobLinkedin::class, mappedBy="user")
  310.      */
  311.     private $assocUserJobLinkedins;
  312.     /**
  313.      * @ORM\ManyToMany(targetEntity=Formation::class, inversedBy="users")
  314.      */
  315.     private $formations;
  316.     /**
  317.      * @ORM\Column(type="integer", nullable=true)
  318.      */
  319.     private $studentRating;
  320.     /**
  321.      * @ORM\Column(type="text", nullable=true)
  322.      */
  323.     private $studentRatingComment;
  324.     /**
  325.      * @ORM\Column(type="text", nullable=true)
  326.      */
  327.     private $cvAsText;
  328.     /**
  329.      * @ORM\ManyToMany(targetEntity=Job::class, inversedBy="studentsPropertyOfCv")
  330.      * @ORM\JoinTable(name="student_job")
  331.      */
  332.     private $jobsFoundedCv;
  333.     /**
  334.      * @ORM\Column(type="string", length=255, nullable=true)
  335.      */
  336.     private $aiAvatar;
  337.     
  338.     /**
  339.      * @ORM\OneToMany(targetEntity=Interview::class, mappedBy="user")
  340.      */
  341.     private $interviews;
  342.     /**
  343.      * @ORM\Column(type="boolean", nullable=true)
  344.      */
  345.     private $jobScraped;
  346.     /**
  347.      * @ORM\OneToMany(targetEntity=UserRiasecProfile::class, mappedBy="user")
  348.      */
  349.     private $userRiasecProfiles;
  350.     /**
  351.      * @ORM\OneToMany(targetEntity=UserJobAlgo::class, mappedBy="user")
  352.      */
  353.     private $userJobAlgos;
  354.     /**
  355.      * @ORM\Column(type="integer", nullable=true)
  356.      */
  357.     private $riasecProfileMyOpinion;
  358.     /**
  359.      * @ORM\Column(type="integer", nullable=true)
  360.      */
  361.     private $bigFiveProfileMyOpinion;
  362.     /**
  363.      * @ORM\Column(type="boolean", nullable=true)
  364.      */
  365.     private $cvProjectiveGenerated;
  366.     /**
  367.      * @ORM\ManyToMany(targetEntity=JobContract::class)
  368.      */
  369.     private $jobContracts;
  370.     /**
  371.      * @ORM\Column(type="array", nullable=true)
  372.      */
  373.     private $workSites = [];
  374.     /**
  375.      * @ORM\Column(type="text", nullable=true)
  376.      */
  377.     private $resultScrapJobs;
  378.     /**
  379.      * @ORM\Column(type="string", length=255, nullable=true)
  380.      */
  381.     private $riasec;
  382.     /**
  383.      * @ORM\Column(type="string", length=255, nullable=true)
  384.      */
  385.     private $bigfive;
  386.     /**
  387.      * @ORM\ManyToMany(targetEntity=School::class, inversedBy="recruters")
  388.      */
  389.     private $schoolrecruter;
  390.     /**
  391.      * @ORM\Column(type="boolean", nullable=true)
  392.      */
  393.     private $authorizedToCoaching;
  394.     /**
  395.      * @ORM\Column(type="text", nullable=true)
  396.      */
  397.     private $resultScrap1;
  398.     /**
  399.      * @ORM\Column(type="text", nullable=true)
  400.      */
  401.     private $cvImage;
  402.     
  403.     /**
  404.      * @ORM\OneToMany(targetEntity=UserSociety::class, mappedBy="user")
  405.      */
  406.     private $societies;
  407.     
  408.     /**
  409.      * @ORM\OneToMany(targetEntity=Society::class, mappedBy="createdby")
  410.      */
  411.     private $createSocieties;
  412.     
  413.     /**
  414.      * @ORM\OneToMany(targetEntity=Annonce::class, mappedBy="createdby")
  415.      */
  416.     private $createAnnonces;
  417.     /**
  418.      * @ORM\ManyToOne(targetEntity=Cursus::class, inversedBy="users")
  419.      */
  420.     private $cursus;
  421.     /**
  422.      * @ORM\OneToMany(targetEntity=AssocUserJobMyJobGlasses::class, mappedBy="user")
  423.      */
  424.     private $assocUserJobMyJobGlasses;
  425.     /**
  426.      * @ORM\OneToMany(targetEntity=InterviewUserFavorite::class, mappedBy="user")
  427.      */
  428.     private $interviewUserFavorites;
  429.     /**
  430.      * @ORM\ManyToMany(targetEntity=Job::class, inversedBy="studentsWhoValidateJob")
  431.      * @ORM\JoinTable(name="student_validate_job")
  432.      */
  433.     private $validateJobs;
  434.     /**
  435.      * @ORM\Column(type="boolean", nullable=true, options={"default"=0})
  436.      */
  437.     private $unsubscribed;
  438.     public function __construct()
  439.     {
  440.         $this->userRiasecResponses = new ArrayCollection();
  441.         $this->riasecInvitationAccesses = new ArrayCollection();
  442.         $this->favorites = new ArrayCollection();
  443.         $this->languages = new ArrayCollection();
  444.         $this->tools = new ArrayCollection();
  445.         $this->userIkigaiResponses = new ArrayCollection();
  446.         $this->linkedinProfiles = new ArrayCollection();
  447.         $this->userSteps = new ArrayCollection();
  448.         $this->tags = new ArrayCollection();
  449.         $this->userAccessTokens = new ArrayCollection();
  450.         $this->studentFormations = new ArrayCollection();
  451.         $this->positiveDescriptionChoices = new ArrayCollection();
  452.         $this->negativeDescriptionChoices = new ArrayCollection();
  453.         $this->showAllJob true;
  454.         $this->sites = new ArrayCollection();
  455.         $this->userRBQuizResponses = new ArrayCollection();
  456.         $this->userRBSteps = new ArrayCollection();
  457.         $this->qualities = new ArrayCollection();
  458.         $this->progress = new ArrayCollection();
  459.         $this->assocLanguageLevels = new ArrayCollection();
  460.         $this->experiencesJob = new ArrayCollection();
  461.         $this->assocUserJobLinkedins = new ArrayCollection();
  462.         $this->formations = new ArrayCollection();
  463.         $this->jobsFoundedCv = new ArrayCollection();
  464.         $this->interviews = new ArrayCollection();
  465.         $this->userRiasecProfiles = new ArrayCollection();
  466.         $this->userJobAlgos = new ArrayCollection();
  467.         $this->jobContracts = new ArrayCollection();
  468.         $this->schoolrecruter = new ArrayCollection();
  469.         $this->societies = new ArrayCollection();
  470.         $this->createSocieties = new ArrayCollection();
  471.         $this->createAnnonces = new ArrayCollection();
  472.         $this->assocUserJobMyJobGlasses = new ArrayCollection();
  473.         $this->interviewUserFavorites = new ArrayCollection();
  474.         $this->validateJobs = new ArrayCollection();
  475.         $this->unsubscribed false;
  476.     }
  477.     public function getId(): ?int
  478.     {
  479.         return $this->id;
  480.     }
  481.     public function getEmail(): ?string
  482.     {
  483.         return $this->email;
  484.     }
  485.     public function setEmail(string $email): self
  486.     {
  487.         $this->email $email;
  488.         return $this;
  489.     }
  490.     /**
  491.      * A visual identifier that represents this user.
  492.      *
  493.      * @see UserInterface
  494.      */
  495.     public function getUserIdentifier(): string
  496.     {
  497.         return (string) $this->email;
  498.     }
  499.     /**
  500.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  501.      */
  502.     public function getUsername(): string
  503.     {
  504.         return (string) $this->email;
  505.     }
  506.     /**
  507.      * @see UserInterface
  508.      */
  509.     public function getRoles(): array
  510.     {
  511.         $roles $this->roles;
  512.         // guarantee every user at least has ROLE_USER
  513.         $roles[] = 'ROLE_USER';
  514.         return array_unique($roles);
  515.     }
  516.     public function setRoles(array $roles): self
  517.     {
  518.         $this->roles $roles;
  519.         return $this;
  520.     }
  521.     /**
  522.      * @see PasswordAuthenticatedUserInterface
  523.      */
  524.     public function getPassword(): string
  525.     {
  526.         return $this->password;
  527.     }
  528.     public function setPassword(string $password): self
  529.     {
  530.         $this->password $password;
  531.         return $this;
  532.     }
  533.     /**
  534.      * Returning a salt is only needed, if you are not using a modern
  535.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  536.      *
  537.      * @see UserInterface
  538.      */
  539.     public function getSalt(): ?string
  540.     {
  541.         return null;
  542.     }
  543.     /**
  544.      * @see UserInterface
  545.      */
  546.     public function eraseCredentials()
  547.     {
  548.         // If you store any temporary, sensitive data on the user, clear it here
  549.         // $this->plainPassword = null;
  550.     }
  551.     public function getAvatar(): ?string
  552.     {
  553.         return $this->avatar;
  554.     }
  555.     public function setAvatar(?string $avatar): self
  556.     {
  557.         $this->avatar $avatar;
  558.         return $this;
  559.     }
  560.     public function getLastname(): ?string
  561.     {
  562.         return $this->lastname;
  563.     }
  564.     public function setLastname(?string $lastname): self
  565.     {
  566.         $this->lastname $lastname;
  567.         return $this;
  568.     }
  569.     public function getFirstname(): ?string
  570.     {
  571.         return $this->firstname;
  572.     }
  573.     public function setFirstname(?string $firstname): self
  574.     {
  575.         $this->firstname $firstname;
  576.         return $this;
  577.     }
  578.     
  579.     public function getFullname() {
  580.         return ($this->firstname $this->firstname " " "") . $this->lastname ;
  581.     }
  582.     
  583.     public function hasRole($role) {
  584.         if(empty($this->roles)){
  585.             $this->roles[] = self::ROLE_USER;
  586.         }
  587.         return in_array($role$this->roles);
  588.     }
  589.     public function getPhone(): ?string
  590.     {
  591.         return $this->phone;
  592.     }
  593.     public function setPhone(?string $phone): self
  594.     {
  595.         $this->phone $phone;
  596.         return $this;
  597.     }
  598.     /**
  599.      * @return Collection<int, UserRiasecResponse>
  600.      */
  601.     public function getUserRiasecResponses(): Collection
  602.     {
  603.         return $this->userRiasecResponses;
  604.     }
  605.     public function addUserRiasecResponse(UserRiasecResponse $userRiasecResponse): self
  606.     {
  607.         if (!$this->userRiasecResponses->contains($userRiasecResponse)) {
  608.             $this->userRiasecResponses[] = $userRiasecResponse;
  609.             $userRiasecResponse->setUser($this);
  610.         }
  611.         return $this;
  612.     }
  613.     public function removeUserRiasecResponse(UserRiasecResponse $userRiasecResponse): self
  614.     {
  615.         if ($this->userRiasecResponses->removeElement($userRiasecResponse)) {
  616.             // set the owning side to null (unless already changed)
  617.             if ($userRiasecResponse->getUser() === $this) {
  618.                 $userRiasecResponse->setUser(null);
  619.             }
  620.         }
  621.         return $this;
  622.     }
  623.     /**
  624.      * @return Collection<int, RiasecInvitationAccess>
  625.      */
  626.     public function getRiasecInvitationAccesses(): Collection
  627.     {
  628.         return $this->riasecInvitationAccesses;
  629.     }
  630.     public function addRiasecInvitationAccess(RiasecInvitationAccess $riasecInvitationAccess): self
  631.     {
  632.         if (!$this->riasecInvitationAccesses->contains($riasecInvitationAccess)) {
  633.             $this->riasecInvitationAccesses[] = $riasecInvitationAccess;
  634.             $riasecInvitationAccess->setUser($this);
  635.         }
  636.         return $this;
  637.     }
  638.     public function removeRiasecInvitationAccess(RiasecInvitationAccess $riasecInvitationAccess): self
  639.     {
  640.         if ($this->riasecInvitationAccesses->removeElement($riasecInvitationAccess)) {
  641.             // set the owning side to null (unless already changed)
  642.             if ($riasecInvitationAccess->getUser() === $this) {
  643.                 $riasecInvitationAccess->setUser(null);
  644.             }
  645.         }
  646.         return $this;
  647.     }
  648.     /**
  649.      * @return Collection<int, Favorites>
  650.      */
  651.     public function getFavorites(): Collection
  652.     {
  653.         return $this->favorites;
  654.     }
  655.     public function addFavorite(Favorites $favorite): self
  656.     {
  657.         if (!$this->favorites->contains($favorite)) {
  658.             $this->favorites[] = $favorite;
  659.             $favorite->setUser($this);
  660.         }
  661.         return $this;
  662.     }
  663.     public function removeFavorite(Favorites $favorite): self
  664.     {
  665.         if ($this->favorites->removeElement($favorite)) {
  666.             // set the owning side to null (unless already changed)
  667.             if ($favorite->getUser() === $this) {
  668.                 $favorite->setUser(null);
  669.             }
  670.         }
  671.         return $this;
  672.     }
  673.     public function getDateOfBirth(): ?\DateTimeInterface
  674.     {
  675.         return $this->dateOfBirth;
  676.     }
  677.     public function setDateOfBirth(?\DateTimeInterface $dateOfBirth): self
  678.     {
  679.         $this->dateOfBirth $dateOfBirth;
  680.         return $this;
  681.     }
  682.     public function getCityOfSchool(): ?string
  683.     {
  684.         return $this->cityOfSchool;
  685.     }
  686.     public function setCityOfSchool(?string $cityOfSchool): self
  687.     {
  688.         $this->cityOfSchool $cityOfSchool;
  689.         return $this;
  690.     }
  691.     public function getSchool(): ?School
  692.     {
  693.         return $this->school;
  694.     }
  695.     public function setSchool(?School $school): self
  696.     {
  697.         $this->school $school;
  698.         return $this;
  699.     }
  700.     public function getSchoolLevel(): ?Level
  701.     {
  702.         return $this->schoolLevel;
  703.     }
  704.     public function setSchoolLevel(?Level $schoolLevel): self
  705.     {
  706.         $this->schoolLevel $schoolLevel;
  707.         return $this;
  708.     }
  709.     public function getLinkedin(): ?string
  710.     {
  711.         return $this->linkedin;
  712.     }
  713.     public function setLinkedin(?string $linkedin): self
  714.     {
  715.         $this->linkedin $linkedin;
  716.         return $this;
  717.     }
  718.     public function getCv(): ?string
  719.     {
  720.         return $this->cv;
  721.     }
  722.     public function setCv(?string $cv): self
  723.     {
  724.         $this->cv $cv;
  725.         return $this;
  726.     }
  727.     /**
  728.      * @return Collection<int, Language>
  729.      */
  730.     public function getLanguages(): Collection
  731.     {
  732.         return $this->languages;
  733.     }
  734.     public function addLanguage(Language $language): self
  735.     {
  736.         if (!$this->languages->contains($language)) {
  737.             $this->languages[] = $language;
  738.         }
  739.         return $this;
  740.     }
  741.     public function removeLanguage(Language $language): self
  742.     {
  743.         $this->languages->removeElement($language);
  744.         return $this;
  745.     }
  746.     /**
  747.      * @return Collection<int, Tools>
  748.      */
  749.     public function getTools(): Collection
  750.     {
  751.         return $this->tools;
  752.     }
  753.     public function addTool(Tools $tool): self
  754.     {
  755.         if (!$this->tools->contains($tool)) {
  756.             $this->tools[] = $tool;
  757.         }
  758.         return $this;
  759.     }
  760.     public function removeTool(Tools $tool): self
  761.     {
  762.         $this->tools->removeElement($tool);
  763.         return $this;
  764.     }
  765.     public function getJobContract(): ?JobContract
  766.     {
  767.         return $this->jobContract;
  768.     }
  769.     public function setJobContract(?JobContract $jobContract): self
  770.     {
  771.         $this->jobContract $jobContract;
  772.         return $this;
  773.     }
  774.     public function getContractDuration(): ?int
  775.     {
  776.         return $this->contractDuration;
  777.     }
  778.     public function setContractDuration(?int $contractDuration): self
  779.     {
  780.         $this->contractDuration $contractDuration;
  781.         return $this;
  782.     }
  783.     public function getStartJob(): ?string
  784.     {
  785.         return $this->startJob;
  786.     }
  787.     public function setStartJob(?string $startJob): self
  788.     {
  789.         $this->startJob $startJob;
  790.         return $this;
  791.     }
  792.     /**
  793.      * @return Collection<int, UserIkigaiResponse>
  794.      */
  795.     public function getUserIkigaiResponses(): Collection
  796.     {
  797.         return $this->userIkigaiResponses;
  798.     }
  799.     public function addUserIkigaiResponse(UserIkigaiResponse $userIkigaiResponse): self
  800.     {
  801.         if (!$this->userIkigaiResponses->contains($userIkigaiResponse)) {
  802.             $this->userIkigaiResponses[] = $userIkigaiResponse;
  803.             $userIkigaiResponse->setUser($this);
  804.         }
  805.         return $this;
  806.     }
  807.     public function removeUserIkigaiResponse(UserIkigaiResponse $userIkigaiResponse): self
  808.     {
  809.         if ($this->userIkigaiResponses->removeElement($userIkigaiResponse)) {
  810.             // set the owning side to null (unless already changed)
  811.             if ($userIkigaiResponse->getUser() === $this) {
  812.                 $userIkigaiResponse->setUser(null);
  813.             }
  814.         }
  815.         return $this;
  816.     }
  817.     /**
  818.      * @return Collection<int, LinkedinProfile>
  819.      */
  820.     public function getLinkedinProfiles(): Collection
  821.     {
  822.         return $this->linkedinProfiles;
  823.     }
  824.     public function addLinkedinProfile(LinkedinProfile $linkedinProfile): self
  825.     {
  826.         if (!$this->linkedinProfiles->contains($linkedinProfile)) {
  827.             $this->linkedinProfiles[] = $linkedinProfile;
  828.             $linkedinProfile->setUser($this);
  829.         }
  830.         return $this;
  831.     }
  832.     public function removeLinkedinProfile(LinkedinProfile $linkedinProfile): self
  833.     {
  834.         if ($this->linkedinProfiles->removeElement($linkedinProfile)) {
  835.             // set the owning side to null (unless already changed)
  836.             if ($linkedinProfile->getUser() === $this) {
  837.                 $linkedinProfile->setUser(null);
  838.             }
  839.         }
  840.         return $this;
  841.     }
  842.     /**
  843.      * @return Collection<int, UserStep>
  844.      */
  845.     public function getUserSteps(): Collection
  846.     {
  847.         return $this->userSteps;
  848.     }
  849.     public function addUserStep(UserStep $userStep): self
  850.     {
  851.         if (!$this->userSteps->contains($userStep)) {
  852.             $this->userSteps[] = $userStep;
  853.             $userStep->setUser($this);
  854.         }
  855.         return $this;
  856.     }
  857.     public function removeUserStep(UserStep $userStep): self
  858.     {
  859.         if ($this->userSteps->removeElement($userStep)) {
  860.             // set the owning side to null (unless already changed)
  861.             if ($userStep->getUser() === $this) {
  862.                 $userStep->setUser(null);
  863.             }
  864.         }
  865.         return $this;
  866.     }
  867.     /**
  868.      * @return Collection<int, Tag>
  869.      */
  870.     public function getTags(): Collection
  871.     {
  872.         return $this->tags;
  873.     }
  874.     public function addTag(Tag $tag): self
  875.     {
  876.         if (!$this->tags->contains($tag)) {
  877.             $this->tags[] = $tag;
  878.         }
  879.         return $this;
  880.     }
  881.     public function removeTag(Tag $tag): self
  882.     {
  883.         $this->tags->removeElement($tag);
  884.         return $this;
  885.     }
  886.     
  887.     public function existedRoles() {
  888.         return self::ROLES;
  889.     }
  890.     public function getStudentEmail(): ?string
  891.     {
  892.         return $this->studentEmail;
  893.     }
  894.     public function setStudentEmail(?string $studentEmail): self
  895.     {
  896.         $this->studentEmail $studentEmail;
  897.         return $this;
  898.     }
  899.     public function getCitiesOfJob(): ?array
  900.     {
  901.         return $this->citiesOfJob;
  902.     }
  903.     public function setCitiesOfJob(?array $citiesOfJob): self
  904.     {
  905.         $this->citiesOfJob $citiesOfJob;
  906.         return $this;
  907.     }
  908.     public function getLastConnection(): ?\DateTimeInterface
  909.     {
  910.         return $this->lastConnection;
  911.     }
  912.     public function setLastConnection(?\DateTimeInterface $lastConnection): self
  913.     {
  914.         $this->lastConnection $lastConnection;
  915.         return $this;
  916.     }
  917.     
  918.     public function getRoleLabel() {
  919.         
  920.         if($this->hasRole(self::ROLE_ADMIN)) {
  921.             return self::ROLES_LABEL[self::ROLE_ADMIN];
  922.         }
  923.     
  924.         if($this->hasRole(self::ROLE_INTERVENING)) {
  925.             return self::ROLES_LABEL[self::ROLE_INTERVENING];
  926.         }
  927.         
  928.         if($this->hasRole(self::ROLE_TEST)) {
  929.             return self::ROLES_LABEL[self::ROLE_TEST];
  930.         }
  931.     
  932.         if($this->hasRole(self::ROLE_RECRUTER)) {
  933.             return self::ROLES_LABEL[self::ROLE_RECRUTER];
  934.         }
  935.     
  936.         if($this->hasRole(self::ROLE_SCHOOL_ADMIN)) {
  937.             return self::ROLES_LABEL[self::ROLE_SCHOOL_ADMIN];
  938.         }
  939.         
  940.         return "Etudiant";
  941.     }
  942.     
  943.     public function getUserRole() {
  944.         if($this->hasRole(self::ROLE_ADMIN)) {
  945.             return self::ROLE_ADMIN;
  946.         }
  947.     
  948.         if($this->hasRole(self::ROLE_INTERVENING)) {
  949.             return self::ROLE_INTERVENING;
  950.         }
  951.     
  952.         if($this->hasRole(self::ROLE_RECRUTER)) {
  953.             return self::ROLE_RECRUTER;
  954.         }
  955.     
  956.         if($this->hasRole(self::ROLE_SCHOOL_ADMIN)) {
  957.             return self::ROLE_SCHOOL_ADMIN;
  958.         }
  959.     
  960.         return self::ROLE_USER;
  961.     }
  962.     
  963.     public function getContractDurationLabel() {
  964.         if(is_null($this->contractDuration)) {
  965.             return "";
  966.         }
  967.         
  968.         switch ($this->contractDuration) {
  969.             case 25:
  970.                 return "Indéterminée";
  971.             case 24:
  972.                 return "24 mois";
  973.             case 18:
  974.                 return "18 mois";
  975.             case 12:
  976.                 return "12 mois";
  977.             case 4:
  978.                 return "4 Ã  6 mois";
  979.             case 1:
  980.                 return "0 Ã  3 mois";
  981.         }
  982.     }
  983.     
  984.     public function formatStarJob() {
  985.         return $this->startJob && strlen($this->startJob) == "0".$this->startJob $this->startJob;
  986.     }
  987.     /**
  988.      * @return Collection<int, UserAccessToken>
  989.      */
  990.     public function getUserAccessTokens(): Collection
  991.     {
  992.         return $this->userAccessTokens;
  993.     }
  994.     public function addUserAccessToken(UserAccessToken $userAccessToken): self
  995.     {
  996.         if (!$this->userAccessTokens->contains($userAccessToken)) {
  997.             $this->userAccessTokens[] = $userAccessToken;
  998.             $userAccessToken->setUser($this);
  999.         }
  1000.         return $this;
  1001.     }
  1002.     public function removeUserAccessToken(UserAccessToken $userAccessToken): self
  1003.     {
  1004.         if ($this->userAccessTokens->removeElement($userAccessToken)) {
  1005.             // set the owning side to null (unless already changed)
  1006.             if ($userAccessToken->getUser() === $this) {
  1007.                 $userAccessToken->setUser(null);
  1008.             }
  1009.         }
  1010.         return $this;
  1011.     }
  1012.     /**
  1013.      * @return Collection<int, JobSubCategory>
  1014.      */
  1015.     public function getStudentFormations(): Collection
  1016.     {
  1017.         return $this->studentFormations;
  1018.     }
  1019.     
  1020.     /**
  1021.      * @param JobSubCategory[] $studentFormations
  1022.      */
  1023.     public function setStudentFormations($studentFormations) {
  1024.         $this->studentFormations $studentFormations;
  1025.     }
  1026.     public function addStudentFormations(JobSubCategory $studentFormation): self
  1027.     {
  1028.         if (!$this->studentFormations->contains($studentFormation)) {
  1029.             $this->studentFormations[] = $studentFormation;
  1030.         }
  1031.         return $this;
  1032.     }
  1033.     public function removeStudentFormations(JobSubCategory $studentFormation): self
  1034.     {
  1035.         $this->studentFormations->removeElement($studentFormation);
  1036.         return $this;
  1037.     }
  1038.     /**
  1039.      * @return Collection<int, ProfilPositiveDescription>
  1040.      */
  1041.     public function getPositiveDescriptionChoices(): Collection
  1042.     {
  1043.         return $this->positiveDescriptionChoices;
  1044.     }
  1045.     
  1046.     /**
  1047.      * @param ProfilPositiveDescription[] $positiveDescriptionChoices
  1048.      */
  1049.     public function setPositiveDescriptionChoices($positiveDescriptionChoices) {
  1050.         $this->positiveDescriptionChoices $positiveDescriptionChoices;
  1051.     }
  1052.     public function addPositiveDescriptionChoice(ProfilPositiveDescription $positiveDescriptionChoice): self
  1053.     {
  1054.         if (!$this->positiveDescriptionChoices->contains($positiveDescriptionChoice)) {
  1055.             $this->positiveDescriptionChoices[] = $positiveDescriptionChoice;
  1056.         }
  1057.         return $this;
  1058.     }
  1059.     public function removePositiveDescriptionChoice(ProfilPositiveDescription $positiveDescriptionChoice): self
  1060.     {
  1061.         $this->positiveDescriptionChoices->removeElement($positiveDescriptionChoice);
  1062.         return $this;
  1063.     }
  1064.     /**
  1065.      * @return Collection<int, ProfilNegativeDescription>
  1066.      */
  1067.     public function getNegativeDescriptionChoices(): Collection
  1068.     {
  1069.         return $this->negativeDescriptionChoices;
  1070.     }
  1071.     
  1072.     /**
  1073.      * @param ProfilNegativeDescription[] $negativeDescriptionChoices
  1074.      */
  1075.     public function setNegativeDescriptionChoices($negativeDescriptionChoices) {
  1076.         $this->negativeDescriptionChoices $negativeDescriptionChoices;
  1077.     }
  1078.     public function addNegativeDescriptionChoice(ProfilNegativeDescription $negativeDescriptionChoice): self
  1079.     {
  1080.         if (!$this->negativeDescriptionChoices->contains($negativeDescriptionChoice)) {
  1081.             $this->negativeDescriptionChoices[] = $negativeDescriptionChoice;
  1082.         }
  1083.         return $this;
  1084.     }
  1085.     public function removeNegativeDescriptionChoice(ProfilNegativeDescription $negativeDescriptionChoice): self
  1086.     {
  1087.         $this->negativeDescriptionChoices->removeElement($negativeDescriptionChoice);
  1088.         return $this;
  1089.     }
  1090.     public function isShowAllJob(): ?bool
  1091.     {
  1092.         return $this->showAllJob;
  1093.     }
  1094.     public function setShowAllJob(?bool $showAllJob): self
  1095.     {
  1096.         $this->showAllJob $showAllJob;
  1097.         return $this;
  1098.     }
  1099.     /**
  1100.      * @return Collection<int, Site>
  1101.      */
  1102.     public function getSites(): Collection
  1103.     {
  1104.         return $this->sites;
  1105.     }
  1106.     public function addSite(Site $site): self
  1107.     {
  1108.         if (!$this->sites->contains($site)) {
  1109.             $this->sites[] = $site;
  1110.         }
  1111.         return $this;
  1112.     }
  1113.     public function removeSite(Site $site): self
  1114.     {
  1115.         $this->sites->removeElement($site);
  1116.         return $this;
  1117.     }
  1118.     
  1119.     public function getRolesData() {
  1120.         return self::ROLES;
  1121.     }
  1122.     public function isFirstConnexion(): ?bool
  1123.     {
  1124.         return is_null($this->firstConnexion) ? true $this->firstConnexion;
  1125.     }
  1126.     public function setFirstConnexion(?bool $firstConnexion): self
  1127.     {
  1128.         $this->firstConnexion $firstConnexion;
  1129.         return $this;
  1130.     }
  1131.     public function getAnimalNickname(): ?string
  1132.     {
  1133.         return $this->animalNickname;
  1134.     }
  1135.     public function setAnimalNickname(?string $animalNickname): self
  1136.     {
  1137.         $this->animalNickname $animalNickname;
  1138.         return $this;
  1139.     }
  1140.     /**
  1141.      * @return Collection<int, UserRBQuizResponse>
  1142.      */
  1143.     public function getUserRBQuizResponses(): Collection
  1144.     {
  1145.         return $this->userRBQuizResponses;
  1146.     }
  1147.     public function addUserRBQuizResponse(UserRBQuizResponse $userRBQuizResponse): self
  1148.     {
  1149.         if (!$this->userRBQuizResponses->contains($userRBQuizResponse)) {
  1150.             $this->userRBQuizResponses[] = $userRBQuizResponse;
  1151.             $userRBQuizResponse->setUser($this);
  1152.         }
  1153.         return $this;
  1154.     }
  1155.     public function removeUserRBQuizResponse(UserRBQuizResponse $userRBQuizResponse): self
  1156.     {
  1157.         if ($this->userRBQuizResponses->removeElement($userRBQuizResponse)) {
  1158.             // set the owning side to null (unless already changed)
  1159.             if ($userRBQuizResponse->getUser() === $this) {
  1160.                 $userRBQuizResponse->setUser(null);
  1161.             }
  1162.         }
  1163.         return $this;
  1164.     }
  1165.     /**
  1166.      * @return Collection<int, UserRBStep>
  1167.      */
  1168.     public function getUserRBSteps(): Collection
  1169.     {
  1170.         return $this->userRBSteps;
  1171.     }
  1172.     public function addUserRBStep(UserRBStep $userRBStep): self
  1173.     {
  1174.         if (!$this->userRBSteps->contains($userRBStep)) {
  1175.             $this->userRBSteps[] = $userRBStep;
  1176.             $userRBStep->setUser($this);
  1177.         }
  1178.         return $this;
  1179.     }
  1180.     public function removeUserRBStep(UserRBStep $userRBStep): self
  1181.     {
  1182.         if ($this->userRBSteps->removeElement($userRBStep)) {
  1183.             // set the owning side to null (unless already changed)
  1184.             if ($userRBStep->getUser() === $this) {
  1185.                 $userRBStep->setUser(null);
  1186.             }
  1187.         }
  1188.         return $this;
  1189.     }
  1190.     public function getAnimalNickNameSex(): ?string
  1191.     {
  1192.         return $this->animalNickNameSex;
  1193.     }
  1194.     public function setAnimalNickNameSex(?string $animalNickNameSex): self
  1195.     {
  1196.         $this->animalNickNameSex $animalNickNameSex;
  1197.         return $this;
  1198.     }
  1199.     /**
  1200.      * @return Collection<int, QualityProgress>
  1201.      */
  1202.     public function getQualities(): Collection
  1203.     {
  1204.         return $this->qualities;
  1205.     }
  1206.     public function addQuality(QualityProgress $quality): self
  1207.     {
  1208.         if (!$this->qualities->contains($quality)) {
  1209.             $this->qualities[] = $quality;
  1210.         }
  1211.         return $this;
  1212.     }
  1213.     public function removeQuality(QualityProgress $quality): self
  1214.     {
  1215.         $this->qualities->removeElement($quality);
  1216.         return $this;
  1217.     }
  1218.     
  1219.     public function setQualities(array $qualities) {
  1220.         $this->qualities $qualities;
  1221.     }
  1222.     /**
  1223.      * @return Collection<int, QualityProgress>
  1224.      */
  1225.     public function getProgress(): Collection
  1226.     {
  1227.         return $this->progress;
  1228.     }
  1229.     public function addProgress(QualityProgress $progress): self
  1230.     {
  1231.         if (!$this->progress->contains($progress)) {
  1232.             $this->progress[] = $progress;
  1233.         }
  1234.         return $this;
  1235.     }
  1236.     public function removeProgress(QualityProgress $progress): self
  1237.     {
  1238.         $this->progress->removeElement($progress);
  1239.         return $this;
  1240.     }
  1241.     
  1242.     public function setProgress(array $progress) {
  1243.         $this->progress $progress;
  1244.     }
  1245.     public function isStepAvatarDone(): ?bool
  1246.     {
  1247.         return $this->stepAvatarDone;
  1248.     }
  1249.     public function setStepAvatarDone(?bool $stepAvatarDone): self
  1250.     {
  1251.         $this->stepAvatarDone $stepAvatarDone;
  1252.         return $this;
  1253.     }
  1254.     public function isAcceptAvatar(): ?bool
  1255.     {
  1256.         return $this->acceptAvatar;
  1257.     }
  1258.     public function setAcceptAvatar(?bool $acceptAvatar): self
  1259.     {
  1260.         $this->acceptAvatar $acceptAvatar;
  1261.         return $this;
  1262.     }
  1263.     
  1264.     public function getPhoneCode(): ?string
  1265.     {
  1266.         return $this->phoneCode;
  1267.     }
  1268.     public function setPhoneCode(?string $phoneCode): self
  1269.     {
  1270.         $this->phoneCode $phoneCode;
  1271.         return $this;
  1272.     }
  1273.     public function getAddress(): ?string
  1274.     {
  1275.         return $this->address;
  1276.     }
  1277.     public function setAddress(?string $address): self
  1278.     {
  1279.         $this->address $address;
  1280.         return $this;
  1281.     }
  1282.     public function isHaveDrivingLicense(): ?bool
  1283.     {
  1284.         return $this->haveDrivingLicense;
  1285.     }
  1286.     public function setHaveDrivingLicense(?bool $haveDrivingLicense): self
  1287.     {
  1288.         $this->haveDrivingLicense $haveDrivingLicense;
  1289.         return $this;
  1290.     }
  1291.     /**
  1292.      * @return Collection<int, AssocLanguageLevel>
  1293.      */
  1294.     public function getAssocLanguageLevels(): Collection
  1295.     {
  1296.         return $this->assocLanguageLevels;
  1297.     }
  1298.     public function addAssocLanguageLevel(AssocLanguageLevel $assocLanguageLevel): self
  1299.     {
  1300.         if (!$this->assocLanguageLevels->contains($assocLanguageLevel)) {
  1301.             $this->assocLanguageLevels[] = $assocLanguageLevel;
  1302.         }
  1303.         return $this;
  1304.     }
  1305.     public function removeAssocLanguageLevel(AssocLanguageLevel $assocLanguageLevel): self
  1306.     {
  1307.         $this->assocLanguageLevels->removeElement($assocLanguageLevel);
  1308.         return $this;
  1309.     }
  1310.     public function getCurriculum(): ?Curriculum
  1311.     {
  1312.         return $this->curriculum;
  1313.     }
  1314.     public function setCurriculum(?Curriculum $curriculum): self
  1315.     {
  1316.         $this->curriculum $curriculum;
  1317.         return $this;
  1318.     }
  1319.     /**
  1320.      * @return Collection<int, Job>
  1321.      */
  1322.     public function getExperiencesJob(): Collection
  1323.     {
  1324.         return $this->experiencesJob;
  1325.     }
  1326.     public function addExperiencesJob(Job $experiencesJob): self
  1327.     {
  1328.         if (!$this->experiencesJob->contains($experiencesJob)) {
  1329.             $this->experiencesJob[] = $experiencesJob;
  1330.         }
  1331.         return $this;
  1332.     }
  1333.     public function removeExperiencesJob(Job $experiencesJob): self
  1334.     {
  1335.         $this->experiencesJob->removeElement($experiencesJob);
  1336.         return $this;
  1337.     }
  1338.     public function getRhythm(): ?Rhythm
  1339.     {
  1340.         return $this->rhythm;
  1341.     }
  1342.     public function setRhythm(?Rhythm $rhythm): self
  1343.     {
  1344.         $this->rhythm $rhythm;
  1345.         return $this;
  1346.     }
  1347.     /**
  1348.      * @return Collection<int, AssocUserJobLinkedin>
  1349.      */
  1350.     public function getAssocUserJobLinkedins(): Collection
  1351.     {
  1352.         return $this->assocUserJobLinkedins;
  1353.     }
  1354.     public function addAssocUserJobLinkedin(AssocUserJobLinkedin $assocUserJobLinkedin): self
  1355.     {
  1356.         if (!$this->assocUserJobLinkedins->contains($assocUserJobLinkedin)) {
  1357.             $this->assocUserJobLinkedins[] = $assocUserJobLinkedin;
  1358.             $assocUserJobLinkedin->setUser($this);
  1359.         }
  1360.         return $this;
  1361.     }
  1362.     public function removeAssocUserJobLinkedin(AssocUserJobLinkedin $assocUserJobLinkedin): self
  1363.     {
  1364.         if ($this->assocUserJobLinkedins->removeElement($assocUserJobLinkedin)) {
  1365.             // set the owning side to null (unless already changed)
  1366.             if ($assocUserJobLinkedin->getUser() === $this) {
  1367.                 $assocUserJobLinkedin->setUser(null);
  1368.             }
  1369.         }
  1370.         return $this;
  1371.     }
  1372.     /**
  1373.      * @return Collection<int, Formation>
  1374.      */
  1375.     public function getFormations(): Collection
  1376.     {
  1377.         return $this->formations;
  1378.     }
  1379.     public function addFormation(Formation $formation): self
  1380.     {
  1381.         if (!$this->formations->contains($formation)) {
  1382.             $this->formations[] = $formation;
  1383.         }
  1384.         return $this;
  1385.     }
  1386.     public function removeFormation(Formation $formation): self
  1387.     {
  1388.         $this->formations->removeElement($formation);
  1389.         return $this;
  1390.     }
  1391.     public function getStudentRating(): ?int
  1392.     {
  1393.         return $this->studentRating;
  1394.     }
  1395.     public function setStudentRating(?int $studentRating): self
  1396.     {
  1397.         $this->studentRating $studentRating;
  1398.         return $this;
  1399.     }
  1400.     public function getStudentRatingComment(): ?string
  1401.     {
  1402.         return $this->studentRatingComment;
  1403.     }
  1404.     public function setStudentRatingComment(?string $studentRatingComment): self
  1405.     {
  1406.         $this->studentRatingComment $studentRatingComment;
  1407.         return $this;
  1408.     }
  1409.     public function getCvAsText(): ?string
  1410.     {
  1411.         return $this->cvAsText;
  1412.     }
  1413.     public function setCvAsText(?string $cvAsText): self
  1414.     {
  1415.         $this->cvAsText $cvAsText;
  1416.         return $this;
  1417.     }
  1418.     /**
  1419.      * @return Collection<int, Job>
  1420.      */
  1421.     public function getJobsFoundedCv(): Collection
  1422.     {
  1423.         return $this->jobsFoundedCv;
  1424.     }
  1425.     public function addJobsFoundedCv(Job $jobsFoundedCv): self
  1426.     {
  1427.         if (!$this->jobsFoundedCv->contains($jobsFoundedCv)) {
  1428.             $this->jobsFoundedCv[] = $jobsFoundedCv;
  1429.         }
  1430.         return $this;
  1431.     }
  1432.     public function removeJobsFoundedCv(Job $jobsFoundedCv): self
  1433.     {
  1434.         $this->jobsFoundedCv->removeElement($jobsFoundedCv);
  1435.         return $this;
  1436.     }
  1437.     public function getAiAvatar(): ?string
  1438.     {
  1439.         return $this->aiAvatar;
  1440.     }
  1441.     public function setAiAvatar(?string $aiAvatar): self
  1442.     {
  1443.         $this->aiAvatar $aiAvatar;
  1444.         return $this;
  1445.     }
  1446.     
  1447.     public function isJobScraped(): ?bool
  1448.     {
  1449.         return $this->jobScraped;
  1450.     }
  1451.     public function setJobScraped(?bool $jobScraped): self
  1452.     {
  1453.         $this->jobScraped $jobScraped;
  1454.         return $this;
  1455.     }
  1456.     
  1457.     /**
  1458.      * @return Collection<int, Interview>
  1459.      */
  1460.     public function getInterviews(): Collection
  1461.     {
  1462.         return $this->interviews;
  1463.     }
  1464.     public function addInterview(Interview $interview): self
  1465.     {
  1466.         if (!$this->interviews->contains($interview)) {
  1467.             $this->interviews[] = $interview;
  1468.             $interview->setUser($this);
  1469.         }
  1470.         return $this;
  1471.     }
  1472.     public function removeInterview(Interview $interview): self
  1473.     {
  1474.         if ($this->interviews->removeElement($interview)) {
  1475.             // set the owning side to null (unless already changed)
  1476.             if ($interview->getUser() === $this) {
  1477.                 $interview->setUser(null);
  1478.             }
  1479.         }
  1480.         return $this;
  1481.     }
  1482.     /**
  1483.      * @return Collection<int, UserRiasecProfile>
  1484.      */
  1485.     public function getUserRiasecProfiles(): Collection
  1486.     {
  1487.         return $this->userRiasecProfiles;
  1488.     }
  1489.     public function addUserRiasecProfile(UserRiasecProfile $userRiasecProfile): self
  1490.     {
  1491.         if (!$this->userRiasecProfiles->contains($userRiasecProfile)) {
  1492.             $this->userRiasecProfiles[] = $userRiasecProfile;
  1493.             $userRiasecProfile->setUser($this);
  1494.         }
  1495.         return $this;
  1496.     }
  1497.     public function removeUserRiasecProfile(UserRiasecProfile $userRiasecProfile): self
  1498.     {
  1499.         if ($this->userRiasecProfiles->removeElement($userRiasecProfile)) {
  1500.             // set the owning side to null (unless already changed)
  1501.             if ($userRiasecProfile->getUser() === $this) {
  1502.                 $userRiasecProfile->setUser(null);
  1503.             }
  1504.         }
  1505.         return $this;
  1506.     }
  1507.     /**
  1508.      * @return Collection<int, UserJobAlgo>
  1509.      */
  1510.     public function getUserJobAlgos(): Collection
  1511.     {
  1512.         return $this->userJobAlgos;
  1513.     }
  1514.     public function addUserJobAlgo(UserJobAlgo $userJobAlgo): self
  1515.     {
  1516.         if (!$this->userJobAlgos->contains($userJobAlgo)) {
  1517.             $this->userJobAlgos[] = $userJobAlgo;
  1518.             $userJobAlgo->setUser($this);
  1519.         }
  1520.         return $this;
  1521.     }
  1522.     public function removeUserJobAlgo(UserJobAlgo $userJobAlgo): self
  1523.     {
  1524.         if ($this->userJobAlgos->removeElement($userJobAlgo)) {
  1525.             // set the owning side to null (unless already changed)
  1526.             if ($userJobAlgo->getUser() === $this) {
  1527.                 $userJobAlgo->setUser(null);
  1528.             }
  1529.         }
  1530.         return $this;
  1531.     }
  1532.     public function getRiasecProfileMyOpinion(): ?int
  1533.     {
  1534.         return $this->riasecProfileMyOpinion;
  1535.     }
  1536.     public function setRiasecProfileMyOpinion(?int $riasecProfileMyOpinion): self
  1537.     {
  1538.         $this->riasecProfileMyOpinion $riasecProfileMyOpinion;
  1539.         return $this;
  1540.     }
  1541.     public function getBigFiveProfileMyOpinion(): ?int
  1542.     {
  1543.         return $this->bigFiveProfileMyOpinion;
  1544.     }
  1545.     public function setBigFiveProfileMyOpinion(?int $bigFiveProfileMyOpinion): self
  1546.     {
  1547.         $this->bigFiveProfileMyOpinion $bigFiveProfileMyOpinion;
  1548.         return $this;
  1549.     }
  1550.     public function isCvProjectiveGenerated(): ?bool
  1551.     {
  1552.         return $this->cvProjectiveGenerated;
  1553.     }
  1554.     public function setCvProjectiveGenerated(?bool $cvProjectiveGenerated): self
  1555.     {
  1556.         $this->cvProjectiveGenerated $cvProjectiveGenerated;
  1557.         return $this;
  1558.     }
  1559.     /**
  1560.      * @return Collection<int, JobContract>
  1561.      */
  1562.     public function getJobContracts(): Collection
  1563.     {
  1564.         return $this->jobContracts;
  1565.     }
  1566.     public function addJobContract(JobContract $jobContract): self
  1567.     {
  1568.         if (!$this->jobContracts->contains($jobContract)) {
  1569.             $this->jobContracts[] = $jobContract;
  1570.         }
  1571.         return $this;
  1572.     }
  1573.     public function removeJobContract(JobContract $jobContract): self
  1574.     {
  1575.         $this->jobContracts->removeElement($jobContract);
  1576.         return $this;
  1577.     }
  1578.     public function getWorkSites(): ?array
  1579.     {
  1580.         return $this->workSites;
  1581.     }
  1582.     public function setWorkSites(?array $workSites): self
  1583.     {
  1584.         $this->workSites $workSites;
  1585.         return $this;
  1586.     }
  1587.     public function getResultScrapJobs(): ?string
  1588.     {
  1589.         return $this->resultScrapJobs;
  1590.     }
  1591.     public function setResultScrapJobs(?string $resultScrapJobs): self
  1592.     {
  1593.         $this->resultScrapJobs $resultScrapJobs;
  1594.         return $this;
  1595.     }
  1596.     public function getRiasec(): ?string
  1597.     {
  1598.         return $this->riasec;
  1599.     }
  1600.     public function setRiasec(?string $riasec): self
  1601.     {
  1602.         $this->riasec $riasec;
  1603.         return $this;
  1604.     }
  1605.     public function getBigfive(): ?string
  1606.     {
  1607.         return $this->bigfive;
  1608.     }
  1609.     public function setBigfive(?string $bigfive): self
  1610.     {
  1611.         $this->bigfive $bigfive;
  1612.         return $this;
  1613.     }
  1614.     /**
  1615.      * @return Collection<int, School>
  1616.      */
  1617.     public function getSchoolrecruter(): Collection
  1618.     {
  1619.         return $this->schoolrecruter;
  1620.     }
  1621.     public function addSchoolrecruter(School $schoolrecruter): self
  1622.     {
  1623.         if (!$this->schoolrecruter->contains($schoolrecruter)) {
  1624.             $this->schoolrecruter[] = $schoolrecruter;
  1625.         }
  1626.         return $this;
  1627.     }
  1628.     public function removeSchoolrecruter(School $schoolrecruter): self
  1629.     {
  1630.         $this->schoolrecruter->removeElement($schoolrecruter);
  1631.         return $this;
  1632.     }
  1633.     public function isAuthorizedToCoaching(): ?bool
  1634.     {
  1635.         return $this->authorizedToCoaching;
  1636.     }
  1637.     public function setAuthorizedToCoaching(?bool $authorizedToCoaching): self
  1638.     {
  1639.         $this->authorizedToCoaching $authorizedToCoaching;
  1640.         return $this;
  1641.     }
  1642.     public function getResultScrap1(): ?string
  1643.     {
  1644.         return $this->resultScrap1;
  1645.     }
  1646.     public function setResultScrap1(?string $resultScrap1): self
  1647.     {
  1648.         $this->resultScrap1 $resultScrap1;
  1649.         return $this;
  1650.     }
  1651.     public function getCvImage(): ?string
  1652.     {
  1653.         return $this->cvImage;
  1654.     }
  1655.     public function setCvImage(?string $cvImage): self
  1656.     {
  1657.         $this->cvImage $cvImage;
  1658.         return $this;
  1659.     }
  1660.     
  1661.     /**
  1662.      * @return Collection<int, UserSociety>
  1663.      */
  1664.     public function getSocieties() {
  1665.         return $this->societies;
  1666.     }
  1667.     
  1668.     public function addSociety(Society $society): self
  1669.                                                                          {
  1670.                                                                              if (!$this->societies->contains($society)) {
  1671.                                                                                  $this->societies[] = $society;
  1672.                                                                              }
  1673.                                                                              
  1674.                                                                              return $this;
  1675.                                                                          }
  1676.     
  1677.     public function removeSociety(Society $society): self
  1678.                                                                          {
  1679.                                                                              $this->societies->removeElement($society);
  1680.                                                                              return $this;
  1681.                                                                          }
  1682.     
  1683.     /**
  1684.      * @return Collection<int, Society>
  1685.      */
  1686.     public function getCreateSocieties() {
  1687.                                                                              return $this->createSocieties;
  1688.                                                                          }
  1689.     
  1690.     public function addCreateSociety(Society $society): self
  1691.                                                                          {
  1692.                                                                              if (!$this->createSocieties->contains($society)) {
  1693.                                                                                  $this->createSocieties[] = $society;
  1694.                                                                              }
  1695.                                                                              
  1696.                                                                              return $this;
  1697.                                                                          }
  1698.     
  1699.     public function removeCreateSociety(Society $society): self
  1700.                                                                          {
  1701.                                                                              $this->createSocieties->removeElement($society);
  1702.                                                                              return $this;
  1703.                                                                          }
  1704.     
  1705.     /**
  1706.      * @return Collection<int, Annonce>
  1707.      */
  1708.     public function getCreateAnnoces() {
  1709.                                                                              return $this->createAnnonces;
  1710.                                                                          }
  1711.     
  1712.     public function addCreateAnnonce(Annonce $annonce): self
  1713.                                                                          {
  1714.                                                                              if (!$this->createAnnonces->contains($annonce)) {
  1715.                                                                                  $this->createAnnonces[] = $annonce;
  1716.                                                                              }
  1717.                                                                              
  1718.                                                                              return $this;
  1719.                                                                          }
  1720.     
  1721.     public function removeCreateAnnonce(Annonce $annonce): self
  1722.                                                                          {
  1723.                                                                              $this->createAnnonces->removeElement($annonce);
  1724.                                                                              return $this;
  1725.                                                                          }
  1726.     public function getCursus(): ?Cursus
  1727.     {
  1728.         return $this->cursus;
  1729.     }
  1730.     public function setCursus(?Cursus $cursus): self
  1731.     {
  1732.         $this->cursus $cursus;
  1733.         return $this;
  1734.     }
  1735.     /**
  1736.      * @return Collection<int, AssocUserJobMyJobGlasses>
  1737.      */
  1738.     public function getAssocUserJobMyJobGlasses(): Collection
  1739.     {
  1740.         return $this->assocUserJobMyJobGlasses;
  1741.     }
  1742.     public function addAssocUserJobMyJobGlass(AssocUserJobMyJobGlasses $assocUserJobMyJobGlass): self
  1743.     {
  1744.         if (!$this->assocUserJobMyJobGlasses->contains($assocUserJobMyJobGlass)) {
  1745.             $this->assocUserJobMyJobGlasses[] = $assocUserJobMyJobGlass;
  1746.             $assocUserJobMyJobGlass->setUser($this);
  1747.         }
  1748.         return $this;
  1749.     }
  1750.     public function removeAssocUserJobMyJobGlass(AssocUserJobMyJobGlasses $assocUserJobMyJobGlass): self
  1751.     {
  1752.         if ($this->assocUserJobMyJobGlasses->removeElement($assocUserJobMyJobGlass)) {
  1753.             // set the owning side to null (unless already changed)
  1754.             if ($assocUserJobMyJobGlass->getUser() === $this) {
  1755.                 $assocUserJobMyJobGlass->setUser(null);
  1756.             }
  1757.         }
  1758.         return $this;
  1759.     }
  1760.     /**
  1761.      * @return Collection<int, InterviewUserFavorite>
  1762.      */
  1763.     public function getInterviewUserFavorites(): Collection
  1764.     {
  1765.         return $this->interviewUserFavorites;
  1766.     }
  1767.     public function addInterviewUserFavorite(InterviewUserFavorite $interviewUserFavorite): self
  1768.     {
  1769.         if (!$this->interviewUserFavorites->contains($interviewUserFavorite)) {
  1770.             $this->interviewUserFavorites[] = $interviewUserFavorite;
  1771.             $interviewUserFavorite->setUser($this);
  1772.         }
  1773.         return $this;
  1774.     }
  1775.     public function removeInterviewUserFavorite(InterviewUserFavorite $interviewUserFavorite): self
  1776.     {
  1777.         if ($this->interviewUserFavorites->removeElement($interviewUserFavorite)) {
  1778.             // set the owning side to null (unless already changed)
  1779.             if ($interviewUserFavorite->getUser() === $this) {
  1780.                 $interviewUserFavorite->setUser(null);
  1781.             }
  1782.         }
  1783.         return $this;
  1784.     }
  1785.     /**
  1786.      * @return Collection<int, Job>
  1787.      */
  1788.     public function getValidateJobs(): Collection
  1789.     {
  1790.         return $this->validateJobs;
  1791.     }
  1792.     public function addValidateJob(Job $validateJob): self
  1793.     {
  1794.         if (!$this->validateJobs->contains($validateJob)) {
  1795.             $this->validateJobs[] = $validateJob;
  1796.         }
  1797.         return $this;
  1798.     }
  1799.     public function removeValidateJob(Job $validateJob): self
  1800.     {
  1801.         $this->validateJobs->removeElement($validateJob);
  1802.         return $this;
  1803.     }
  1804.     
  1805.     public function getFullPhoneNumber() {
  1806.         if(is_null($this->phoneCode) || is_null($this->phone)) {
  1807.             return null;
  1808.         }
  1809.         
  1810.         $code trim($this->phoneCode);
  1811.         $number trim($this->phone);
  1812.         $number str_replace(" """$number);
  1813.         if(str_starts_with($number"0")) {
  1814.             $number substr($number1);
  1815.         }
  1816.         
  1817.         return $code.$number;
  1818.     }
  1819.     public function isUnsubscribed(): ?bool
  1820.     {
  1821.         return $this->unsubscribed;
  1822.     }
  1823.     public function setUnsubscribed(?bool $unsubscribed): self
  1824.     {
  1825.         $this->unsubscribed $unsubscribed;
  1826.         return $this;
  1827.     }
  1828. }