src/Entity/User.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\UserRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. use Serializable;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use Symfony\Component\Security\Core\User\PasswordAuthenticatedUserInterface;
  10. use Symfony\Component\Security\Core\User\UserInterface;
  11. use JMS\Serializer\Annotation as Serializer;
  12. /**
  13.  * @ORM\Entity(repositoryClass=UserRepository::class)
  14.  * @ORM\Table(name="`user`")
  15.  * @Serializer\ExclusionPolicy("ALL")
  16.  */
  17. #[UniqueEntity(fields: ['email'], message'message="Ce compte existe déjà')]
  18. class User implements UserInterfacePasswordAuthenticatedUserInterfaceSerializable
  19. {
  20.     /**
  21.      * @ORM\Id
  22.      * @ORM\GeneratedValue
  23.      * @ORM\Column(type="integer")
  24.      * @Serializer\Expose
  25.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "ligth_list", "edit_visitor_profile", "live_details"})
  26.      */
  27.     private $id;
  28.     /**
  29.      * @ORM\Column(type="string", length=180, unique=true)
  30.      * @Serializer\Expose
  31.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "ligth_list", "edit_visitor_profile", "live_details"})
  32.      */
  33.     private $email;
  34.     /**
  35.      * @ORM\Column(type="json")
  36.      */
  37.     private $roles = [];
  38.     /**
  39.      * @var string The hashed password
  40.      * @ORM\Column(type="string", nullable=true)
  41.      */
  42.     private $password;
  43.     /**
  44.      * @ORM\Column(type="datetime", nullable=true)
  45.      */
  46.     private $lastLoginAt;
  47.     /**
  48.      * @ORM\Column(type="datetime", nullable=true)
  49.      */
  50.     private $lastLogoutAt;
  51.     /**
  52.      * @ORM\OneToMany(targetEntity=UserOffice::class, mappedBy="user", cascade={"persist", "remove"}, fetch="EXTRA_LAZY")
  53.      */
  54.     private $userOffices;
  55.     /**
  56.      * @ORM\Column(type="text", nullable=true)
  57.      * @Serializer\Expose
  58.      * @Serializer\Groups({"user_profile"})
  59.      */
  60.     private $description;
  61.     /**
  62.      * @ORM\Column(type="string", length=255, nullable=true)
  63.      * @Serializer\Expose
  64.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "historic", "ligth_list", "edit_visitor_profile", "live_details"})
  65.      */
  66.     private $lastname;
  67.     /**
  68.      * @ORM\Column(type="string", length=255, nullable=true)
  69.      * @Serializer\Expose
  70.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "historic", "ligth_list", "edit_visitor_profile", "live_details"})
  71.      */
  72.     private $firstname;
  73.     /**
  74.      * @ORM\OneToMany(targetEntity=Experience::class, mappedBy="user", cascade={"persist", "remove"}, fetch="EXTRA_LAZY")
  75.      * @Serializer\Expose
  76.      * @Serializer\Groups({"user_profile"})
  77.      */
  78.     private $userExperiences;
  79.     /**
  80.      * @ORM\OneToMany(targetEntity=Course::class, mappedBy="publishedBy", fetch="EXTRA_LAZY")
  81.      */
  82.     private $courses;
  83.     /**
  84.      * @ORM\ManyToMany(targetEntity=Role::class, mappedBy="users")
  85.      */
  86.     private $userRoles;
  87.     /**
  88.      * @ORM\OneToMany(targetEntity=Enrollment::class, mappedBy="user", fetch="EXTRA_LAZY")
  89.      */
  90.     private $enrollments;
  91.     /**
  92.      * @ORM\ManyToOne(targetEntity=Country::class, inversedBy="users")
  93.      * @Serializer\Expose
  94.      * @Serializer\Groups({"edit_visitor_profile"})
  95.      */
  96.     private $country;
  97.     /**
  98.      * @ORM\Column(type="boolean", nullable=true)
  99.      * @Serializer\Expose
  100.      */
  101.     private $isFirstConnexion true;
  102.     /**
  103.      * @ORM\OneToMany(targetEntity=ModuleView::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  104.      */
  105.     private $moduleViews;
  106.     /**
  107.      * @ORM\OneToMany(targetEntity=ModuleLike::class, mappedBy="user", fetch="EXTRA_LAZY")
  108.      */
  109.     private $moduleLikes;
  110.     /**
  111.      * @ORM\OneToMany(targetEntity=Module::class, mappedBy="publishedBy", fetch="EXTRA_LAZY")
  112.      */
  113.     private $modulePublishers;
  114.     /**
  115.      * @ORM\OneToMany(targetEntity=UserQuizQuestion::class, mappedBy="user", fetch="EXTRA_LAZY")
  116.      */
  117.     private $userQuizQuestions;
  118.     /**
  119.      * @ORM\OneToMany(targetEntity=Quote::class, mappedBy="publishedBy", fetch="EXTRA_LAZY")
  120.      */
  121.     private $quotes;
  122.     /**
  123.      * @ORM\OneToMany(targetEntity=Director::class, mappedBy="publishedBy", fetch="EXTRA_LAZY")
  124.      */
  125.     private $directors;
  126.     /**
  127.      * @ORM\ManyToMany(targetEntity=Module::class, mappedBy="coaches")
  128.      */
  129.     private $modules;
  130.     /**
  131.      * @ORM\ManyToMany(targetEntity=Live::class, mappedBy="coaches")
  132.      */
  133.     private $lives;
  134.     /**
  135.      * @ORM\OneToMany(targetEntity=LiveParticipant::class, mappedBy="participant", fetch="EXTRA_LAZY")
  136.      */
  137.     private $liveParticipants;
  138.     /**
  139.      * @ORM\Column(type="string", length=255, nullable=true)
  140.      */
  141.     private $registrationNumber;
  142.     /**
  143.      * @ORM\Column(type="string", length=255, nullable=true)
  144.      */
  145.     private $hierarchicalLevel;
  146.     /**
  147.      * @ORM\OneToMany(targetEntity=ModuleComment::class, mappedBy="user", fetch="EXTRA_LAZY")
  148.      */
  149.     private $moduleComments;
  150.     /**
  151.      * @ORM\ManyToOne(targetEntity=SubsidiaryCompany::class, inversedBy="users")
  152.      * @Serializer\Expose
  153.      * @Serializer\Groups({"user_profile"})
  154.      */
  155.     private $subsidiaryCompany;
  156.     /**
  157.      * @ORM\ManyToOne(targetEntity=Job::class, inversedBy="users")
  158.      */
  159.     private $job;
  160.     /**
  161.      * @ORM\ManyToOne(targetEntity=Office::class, inversedBy="users")
  162.      * @Serializer\Expose
  163.      * @Serializer\Groups({"user_profile"})
  164.      */
  165.     private $office;
  166.     /**
  167.      * @ORM\ManyToOne(targetEntity=Contract::class, inversedBy="users")
  168.      */
  169.     private $contract;
  170.     /**
  171.      * @ORM\Column(type="string", length=255, nullable=true)
  172.      * @Serializer\Expose
  173.      * @Serializer\Groups({"user_profile", "edit_profile", "testimony", "live_details"})
  174.      */
  175.     private $phoneNumber;
  176.     /**
  177.      * @ORM\Column(type="string", length=255, nullable=true)
  178.      */
  179.     private $status;
  180.     /**
  181.      * @ORM\Column(type="boolean", nullable=true)
  182.      */
  183.     private $active true;
  184.     /**
  185.      * @ORM\OneToOne(targetEntity=ImageManager::class, cascade={"persist", "remove"})
  186.      * @Serializer\Expose
  187.      * @Serializer\Groups({"user_profile", "live_details"})
  188.      */
  189.     private $photo;
  190.     /**
  191.      * @ORM\Column(type="string", length=255, nullable=true)
  192.      */
  193.     private $referent;
  194.     /**
  195.      * @ORM\Column(type="datetime", nullable=true)
  196.      * @Serializer\Expose
  197.      * @Serializer\Groups({"user_profile"})
  198.      */
  199.     private $entryDate;
  200.     /**
  201.      * @ORM\ManyToOne(targetEntity=User::class, inversedBy="responsibles")
  202.      */
  203.     private $responsible;
  204.     /**
  205.      * @ORM\OneToMany(targetEntity=User::class, mappedBy="responsible", fetch="EXTRA_LAZY")
  206.      */
  207.     private $responsibles;
  208.     /**
  209.      * @ORM\OneToMany(targetEntity=ProgramParticipation::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  210.      */
  211.     private $programParticipations;
  212.     /**
  213.      * @ORM\OneToMany(targetEntity=ModuleParticipation::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  214.      */
  215.     private $moduleParticipations;
  216.     /**
  217.      * @ORM\OneToMany(targetEntity=ModuleInscription::class, mappedBy="user", fetch="EXTRA_LAZY")
  218.      */
  219.     private $moduleInscriptions;
  220.     /**
  221.      * @ORM\Column(type="string", length=255, nullable=true)
  222.      */
  223.     private $activationCode;
  224.     /**
  225.      * @ORM\Column(type="datetime", nullable=true)
  226.      */
  227.     private $activationCodeExpiredAt;
  228.     /**
  229.      * @ORM\Column(type="string", length=255, nullable=true)
  230.      */
  231.     private $resetCode;
  232.     /**
  233.      * @ORM\Column(type="datetime", nullable=true)
  234.      */
  235.     private $resetCodeExpiredAt;
  236.     /**
  237.      * @ORM\Column(type="array", nullable=true)
  238.      */
  239.     private $deviceTokens = [];
  240.     /**
  241.      * @ORM\OneToMany(targetEntity=Discussion::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  242.      */
  243.     private $senderDiscussions;
  244.      /**
  245.      * @ORM\OneToMany(targetEntity=Discussion::class, mappedBy="receiver", fetch="EXTRA_LAZY")
  246.      */
  247.     private $receiverDiscussions;
  248.     /**
  249.      * @ORM\OneToMany(targetEntity=Message::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  250.      */
  251.     private $messages;
  252.     /**
  253.      * @ORM\Column(type="boolean")
  254.      */
  255.     private $isVerified true;
  256.     /**
  257.      * @ORM\Column(type="string", length=255, nullable=true)
  258.      */
  259.     private $profileColor;
  260.     /**
  261.      * @ORM\ManyToMany(targetEntity=Program::class, mappedBy="users")
  262.      */
  263.     private $programs;
  264.     /**
  265.      * @ORM\OneToMany(targetEntity=UserModuleParticipation::class, mappedBy="createdBy", fetch="EXTRA_LAZY")
  266.      */
  267.     private $userModuleParticipations;
  268.     /**
  269.      * @ORM\Column(type="boolean", nullable=true)
  270.      */
  271.     private $isInternalAccount false;
  272.     /**
  273.      * @ORM\Column(type="integer", nullable=true)
  274.      */
  275.     private $elapsedTime;
  276.     /**
  277.      * @ORM\OneToMany(targetEntity=Notification::class, mappedBy="receiver", fetch="EXTRA_LAZY")
  278.      */
  279.     private $notifications;
  280.     /**
  281.      * @ORM\OneToMany(targetEntity=NotificationReceiver::class, mappedBy="receiver", fetch="EXTRA_LAZY")
  282.      */
  283.     private $notificationReceivers;
  284.     /**
  285.      * @ORM\Column(type="datetime", nullable=true)
  286.      */
  287.     private $lastLoginNotifiedAt;
  288.     /**
  289.      * @ORM\OneToMany(targetEntity=Message::class, mappedBy="receiver", fetch="EXTRA_LAZY")
  290.      */
  291.     private $receiverMessages;
  292.     /**
  293.      * @ORM\OneToMany(targetEntity=UserQuizParticipation::class, mappedBy="user")
  294.      */
  295.     private $userQuizParticipations;
  296.     public function __construct()
  297.     {
  298.         $this->userOffices = new ArrayCollection();
  299.         $this->userExperiences = new ArrayCollection();
  300.         $this->courses = new ArrayCollection();
  301.         $this->userRoles = new ArrayCollection();
  302.         $this->enrollments = new ArrayCollection();
  303.         $this->moduleViews = new ArrayCollection();
  304.         $this->moduleLikes = new ArrayCollection();
  305.         $this->modulePublishers = new ArrayCollection();
  306.         $this->userQuizQuestions = new ArrayCollection();
  307.         $this->quotes = new ArrayCollection();
  308.         $this->directors = new ArrayCollection();
  309.         $this->modules = new ArrayCollection();
  310.         $this->lives = new ArrayCollection();
  311.         $this->liveParticipants = new ArrayCollection();
  312.         $this->moduleComments = new ArrayCollection();
  313.         $this->responsibles = new ArrayCollection();
  314.         $this->programParticipations = new ArrayCollection();
  315.         $this->moduleParticipations = new ArrayCollection();
  316.         $this->moduleInscriptions = new ArrayCollection();
  317.         $this->senderDiscussions = new ArrayCollection();
  318.         $this->receiverDiscussions = new ArrayCollection();
  319.         $this->messages = new ArrayCollection();
  320.         $this->programs = new ArrayCollection();
  321.         $this->userModuleParticipations = new ArrayCollection();
  322.         $this->notifications = new ArrayCollection();
  323.         $this->notificationReceivers = new ArrayCollection();
  324.         $this->receiverMessages = new ArrayCollection();
  325.         $this->userQuizParticipations = new ArrayCollection();
  326.     }
  327.     public function getId(): ?int
  328.     {
  329.         return $this->id;
  330.     }
  331.     public function getEmail(): ?string
  332.     {
  333.         return $this->email;
  334.     }
  335.     public function setEmail(string $email): self
  336.     {
  337.         $this->email $email;
  338.         return $this;
  339.     }
  340.     /**
  341.      * A visual identifier that represents this user.
  342.      *
  343.      * @see UserInterface
  344.      */
  345.     public function getUserIdentifier(): string
  346.     {
  347.         return (string) $this->email;
  348.     }
  349.     /**
  350.      * @deprecated since Symfony 5.3, use getUserIdentifier instead
  351.      */
  352.     public function getUsername(): string
  353.     {
  354.         return (string) $this->email;
  355.     }
  356.     /**
  357.      * @see UserInterface
  358.      */
  359.     public function getRoles(): array
  360.     {
  361.         $roles $this->roles;
  362.         // guarantee every user at least has ROLE_USER
  363.         $roles[] = 'ROLE_USER';
  364.         return array_unique($roles);
  365.     }
  366.     public function setRoles(array $roles): self
  367.     {
  368.         $this->roles $roles;
  369.         return $this;
  370.     }
  371.     /**
  372.      * @see PasswordAuthenticatedUserInterface
  373.      */
  374.     public function getPassword(): ?string
  375.     {
  376.         return $this->password;
  377.     }
  378.     public function setPassword(?string $password): self
  379.     {
  380.         $this->password $password;
  381.         return $this;
  382.     }
  383.     /**
  384.      * Returning a salt is only needed, if you are not using a modern
  385.      * hashing algorithm (e.g. bcrypt or sodium) in your security.yaml.
  386.      *
  387.      * @see UserInterface
  388.      */
  389.     public function getSalt(): ?string
  390.     {
  391.         return null;
  392.     }
  393.     /**
  394.      * @see UserInterface
  395.      */
  396.     public function eraseCredentials()
  397.     {
  398.         // If you store any temporary, sensitive data on the user, clear it here
  399.         // $this->plainPassword = null;
  400.     }
  401.     public function getLastLoginAt(): ?\DateTimeInterface
  402.     {
  403.         return $this->lastLoginAt;
  404.     }
  405.     public function setLastLoginAt(?\DateTimeInterface $lastLoginAt): self
  406.     {
  407.         $this->lastLoginAt $lastLoginAt;
  408.         return $this;
  409.     }
  410.     public function getLastLogoutAt(): ?\DateTimeInterface
  411.     {
  412.         return $this->lastLogoutAt;
  413.     }
  414.     public function setLastLogoutAt(?\DateTimeInterface $lastLogoutAt): self
  415.     {
  416.         $this->lastLogoutAt $lastLogoutAt;
  417.         return $this;
  418.     }
  419.     /**
  420.      * @return Collection<int, UserOffice>
  421.      */
  422.     public function getUserOffices(): Collection
  423.     {
  424.         return $this->userOffices;
  425.     }
  426.     public function addUserOffice(UserOffice $userOffice): self
  427.     {
  428.         if (!$this->userOffices->contains($userOffice)) {
  429.             $this->userOffices[] = $userOffice;
  430.             $userOffice->setUser($this);
  431.         }
  432.         return $this;
  433.     }
  434.     public function removeUserOffice(UserOffice $userOffice): self
  435.     {
  436.         if ($this->userOffices->removeElement($userOffice)) {
  437.             // set the owning side to null (unless already changed)
  438.             if ($userOffice->getUser() === $this) {
  439.                 $userOffice->setUser(null);
  440.             }
  441.         }
  442.         return $this;
  443.     }
  444.     public function getDescription(): ?string
  445.     {
  446.         return $this->description;
  447.     }
  448.     public function setDescription(?string $description): self
  449.     {
  450.         $this->description $description;
  451.         return $this;
  452.     }
  453.     public function getLastname(): ?string
  454.     {
  455.         return $this->lastname;
  456.     }
  457.     public function setLastname(?string $lastname): self
  458.     {
  459.         $this->lastname $lastname;
  460.         return $this;
  461.     }
  462.     public function getFirstname(): ?string
  463.     {
  464.         return $this->firstname;
  465.     }
  466.     public function setFirstname(?string $firstname): self
  467.     {
  468.         $this->firstname $firstname;
  469.         return $this;
  470.     }
  471.     public function getFullname(): ?string
  472.     {
  473.         return $this->getFirstname().' '.$this->getLastname();
  474.     }
  475.     /**
  476.      * @return Collection<int, Experience>
  477.      */
  478.     public function getUserExperiences(): Collection
  479.     {
  480.         return $this->userExperiences;
  481.     }
  482.     public function addUserExperience(Experience $userExperience): self
  483.     {
  484.         if (!$this->userExperiences->contains($userExperience)) {
  485.             $this->userExperiences[] = $userExperience;
  486.             $userExperience->setUser($this);
  487.         }
  488.         return $this;
  489.     }
  490.     public function removeUserExperience(Experience $userExperience): self
  491.     {
  492.         if ($this->userExperiences->removeElement($userExperience)) {
  493.             // set the owning side to null (unless already changed)
  494.             if ($userExperience->getUser() === $this) {
  495.                 $userExperience->setUser(null);
  496.             }
  497.         }
  498.         return $this;
  499.     }
  500.     /**
  501.      * @return Collection<int, Course>
  502.      */
  503.     public function getCourses(): Collection
  504.     {
  505.         return $this->courses;
  506.     }
  507.     public function addCourse(Course $course): self
  508.     {
  509.         if (!$this->courses->contains($course)) {
  510.             $this->courses[] = $course;
  511.             $course->setPublishedBy($this);
  512.         }
  513.         return $this;
  514.     }
  515.     public function removeCourse(Course $course): self
  516.     {
  517.         if ($this->courses->removeElement($course)) {
  518.             // set the owning side to null (unless already changed)
  519.             if ($course->getPublishedBy() === $this) {
  520.                 $course->setPublishedBy(null);
  521.             }
  522.         }
  523.         return $this;
  524.     }
  525.     /**
  526.      * @return Collection<int, Role>
  527.      */
  528.     public function getUserRoles(): Collection
  529.     {
  530.         return $this->userRoles;
  531.     }
  532.     public function addUserRole(Role $userRole): self
  533.     {
  534.         if (!$this->userRoles->contains($userRole)) {
  535.             $this->userRoles[] = $userRole;
  536.             $userRole->addUser($this);
  537.         }
  538.         return $this;
  539.     }
  540.     public function removeUserRole(Role $userRole): self
  541.     {
  542.         if ($this->userRoles->removeElement($userRole)) {
  543.             $userRole->removeUser($this);
  544.         }
  545.         return $this;
  546.     }
  547.     /**
  548.      * @return Collection<int, Enrollment>
  549.      */
  550.     public function getEnrollments(): Collection
  551.     {
  552.         return $this->enrollments;
  553.     }
  554.     public function addEnrollment(Enrollment $enrollment): self
  555.     {
  556.         if (!$this->enrollments->contains($enrollment)) {
  557.             $this->enrollments[] = $enrollment;
  558.             $enrollment->setUser($this);
  559.         }
  560.         return $this;
  561.     }
  562.     public function removeEnrollment(Enrollment $enrollment): self
  563.     {
  564.         if ($this->enrollments->removeElement($enrollment)) {
  565.             // set the owning side to null (unless already changed)
  566.             if ($enrollment->getUser() === $this) {
  567.                 $enrollment->setUser(null);
  568.             }
  569.         }
  570.         return $this;
  571.     }
  572.     public function getCountry(): ?Country
  573.     {
  574.         return $this->country;
  575.     }
  576.     public function setCountry(?Country $country): self
  577.     {
  578.         $this->country $country;
  579.         return $this;
  580.     }
  581.     public function isIsFirstConnexion(): ?bool
  582.     {
  583.         return $this->isFirstConnexion;
  584.     }
  585.     public function setIsFirstConnexion(?bool $isFirstConnexion): self
  586.     {
  587.         $this->isFirstConnexion $isFirstConnexion;
  588.         return $this;
  589.     }
  590.     /**
  591.      * @return Collection<int, ModuleView>
  592.      */
  593.     public function getModuleViews(): Collection
  594.     {
  595.         return $this->moduleViews;
  596.     }
  597.     public function addModuleView(ModuleView $moduleView): self
  598.     {
  599.         if (!$this->moduleViews->contains($moduleView)) {
  600.             $this->moduleViews[] = $moduleView;
  601.             $moduleView->setCreatedBy($this);
  602.         }
  603.         return $this;
  604.     }
  605.     public function removeModuleView(ModuleView $moduleView): self
  606.     {
  607.         if ($this->moduleViews->removeElement($moduleView)) {
  608.             // set the owning side to null (unless already changed)
  609.             if ($moduleView->getCreatedBy() === $this) {
  610.                 $moduleView->setCreatedBy(null);
  611.             }
  612.         }
  613.         return $this;
  614.     }
  615.     /**
  616.      * @return Collection<int, ModuleLike>
  617.      */
  618.     public function getModuleLikes(): Collection
  619.     {
  620.         return $this->moduleLikes;
  621.     }
  622.     public function addModuleLike(ModuleLike $moduleLike): self
  623.     {
  624.         if (!$this->moduleLikes->contains($moduleLike)) {
  625.             $this->moduleLikes[] = $moduleLike;
  626.             $moduleLike->setUser($this);
  627.         }
  628.         return $this;
  629.     }
  630.     public function removeModuleLike(ModuleLike $moduleLike): self
  631.     {
  632.         if ($this->moduleLikes->removeElement($moduleLike)) {
  633.             // set the owning side to null (unless already changed)
  634.             if ($moduleLike->getUser() === $this) {
  635.                 $moduleLike->setUser(null);
  636.             }
  637.         }
  638.         return $this;
  639.     }
  640.     /**
  641.      * @return Collection<int, Module>
  642.      */
  643.     public function getModulePublishers(): Collection
  644.     {
  645.         return $this->modulePublishers;
  646.     }
  647.     public function addModulePublisher(Module $modulePublisher): self
  648.     {
  649.         if (!$this->modulePublishers->contains($modulePublisher)) {
  650.             $this->modulePublishers[] = $modulePublisher;
  651.             $modulePublisher->setPublishedBy($this);
  652.         }
  653.         return $this;
  654.     }
  655.     public function removeModulePublisher(Module $modulePublisher): self
  656.     {
  657.         if ($this->modulePublishers->removeElement($modulePublisher)) {
  658.             // set the owning side to null (unless already changed)
  659.             if ($modulePublisher->getPublishedBy() === $this) {
  660.                 $modulePublisher->setPublishedBy(null);
  661.             }
  662.         }
  663.         return $this;
  664.     }
  665.     /**
  666.      * @return Collection<int, UserQuizQuestion>
  667.      */
  668.     public function getUserQuizQuestions(): Collection
  669.     {
  670.         return $this->userQuizQuestions;
  671.     }
  672.     public function addUserQuizQuestion(UserQuizQuestion $userQuizQuestion): self
  673.     {
  674.         if (!$this->userQuizQuestions->contains($userQuizQuestion)) {
  675.             $this->userQuizQuestions[] = $userQuizQuestion;
  676.             $userQuizQuestion->setCreatedBy($this);
  677.         }
  678.         return $this;
  679.     }
  680.     public function removeUserQuizQuestion(UserQuizQuestion $userQuizQuestion): self
  681.     {
  682.         if ($this->userQuizQuestions->removeElement($userQuizQuestion)) {
  683.             // set the owning side to null (unless already changed)
  684.             if ($userQuizQuestion->getCreatedBy() === $this) {
  685.                 $userQuizQuestion->setCreatedBy(null);
  686.             }
  687.         }
  688.         return $this;
  689.     }
  690.     /**
  691.      * @return Collection<int, Quote>
  692.      */
  693.     public function getQuotes(): Collection
  694.     {
  695.         return $this->quotes;
  696.     }
  697.     public function addQuote(Quote $quote): self
  698.     {
  699.         if (!$this->quotes->contains($quote)) {
  700.             $this->quotes[] = $quote;
  701.             $quote->setPublishedBy($this);
  702.         }
  703.         return $this;
  704.     }
  705.     public function removeQuote(Quote $quote): self
  706.     {
  707.         if ($this->quotes->removeElement($quote)) {
  708.             // set the owning side to null (unless already changed)
  709.             if ($quote->getPublishedBy() === $this) {
  710.                 $quote->setPublishedBy(null);
  711.             }
  712.         }
  713.         return $this;
  714.     }
  715.     /**
  716.      * @return Collection<int, Director>
  717.      */
  718.     public function getDirectors(): Collection
  719.     {
  720.         return $this->directors;
  721.     }
  722.     public function addDirector(Director $director): self
  723.     {
  724.         if (!$this->directors->contains($director)) {
  725.             $this->directors[] = $director;
  726.             $director->setPublishedBy($this);
  727.         }
  728.         return $this;
  729.     }
  730.     public function removeDirector(Director $director): self
  731.     {
  732.         if ($this->directors->removeElement($director)) {
  733.             // set the owning side to null (unless already changed)
  734.             if ($director->getPublishedBy() === $this) {
  735.                 $director->setPublishedBy(null);
  736.             }
  737.         }
  738.         return $this;
  739.     }
  740.     /**
  741.      * @return Collection<int, Module>
  742.      */
  743.     public function getModules(): Collection
  744.     {
  745.         return $this->modules;
  746.     }
  747.     public function addModule(Module $module): self
  748.     {
  749.         if (!$this->modules->contains($module)) {
  750.             $this->modules[] = $module;
  751.             $module->addCoach($this);
  752.         }
  753.         return $this;
  754.     }
  755.     public function removeModule(Module $module): self
  756.     {
  757.         if ($this->modules->removeElement($module)) {
  758.             $module->removeCoach($this);
  759.         }
  760.         return $this;
  761.     }
  762.     /**
  763.      * @return Collection<int, Live>
  764.      */
  765.     public function getLives(): Collection
  766.     {
  767.         return $this->lives;
  768.     }
  769.     public function addLife(Live $life): self
  770.     {
  771.         if (!$this->lives->contains($life)) {
  772.             $this->lives[] = $life;
  773.             $life->addCoach($this);
  774.         }
  775.         return $this;
  776.     }
  777.     public function removeLife(Live $life): self
  778.     {
  779.         if ($this->lives->removeElement($life)) {
  780.             $life->removeCoach($this);
  781.         }
  782.         return $this;
  783.     }
  784.     /**
  785.      * @return Collection<int, LiveParticipant>
  786.      */
  787.     public function getLiveParticipants(): Collection
  788.     {
  789.         return $this->liveParticipants;
  790.     }
  791.     public function addLiveParticipant(LiveParticipant $liveParticipant): self
  792.     {
  793.         if (!$this->liveParticipants->contains($liveParticipant)) {
  794.             $this->liveParticipants[] = $liveParticipant;
  795.             $liveParticipant->setParticipant($this);
  796.         }
  797.         return $this;
  798.     }
  799.     public function removeLiveParticipant(LiveParticipant $liveParticipant): self
  800.     {
  801.         if ($this->liveParticipants->removeElement($liveParticipant)) {
  802.             // set the owning side to null (unless already changed)
  803.             if ($liveParticipant->getParticipant() === $this) {
  804.                 $liveParticipant->setParticipant(null);
  805.             }
  806.         }
  807.         return $this;
  808.     }
  809.     public function getRegistrationNumber(): ?string
  810.     {
  811.         return $this->registrationNumber;
  812.     }
  813.     public function setRegistrationNumber(?string $registrationNumber): self
  814.     {
  815.         $this->registrationNumber $registrationNumber;
  816.         return $this;
  817.     }
  818.     public function getHierarchicalLevel(): ?string
  819.     {
  820.         return $this->hierarchicalLevel;
  821.     }
  822.     public function setHierarchicalLevel(?string $hierarchicalLevel): self
  823.     {
  824.         $this->hierarchicalLevel $hierarchicalLevel;
  825.         return $this;
  826.     }
  827.     /**
  828.      * @return Collection<int, ModuleComment>
  829.      */
  830.     public function getModuleComments(): Collection
  831.     {
  832.         return $this->moduleComments;
  833.     }
  834.     public function addModuleComment(ModuleComment $moduleComment): self
  835.     {
  836.         if (!$this->moduleComments->contains($moduleComment)) {
  837.             $this->moduleComments[] = $moduleComment;
  838.             $moduleComment->setUser($this);
  839.         }
  840.         return $this;
  841.     }
  842.     public function removeModuleComment(ModuleComment $moduleComment): self
  843.     {
  844.         if ($this->moduleComments->removeElement($moduleComment)) {
  845.             // set the owning side to null (unless already changed)
  846.             if ($moduleComment->getUser() === $this) {
  847.                 $moduleComment->setUser(null);
  848.             }
  849.         }
  850.         return $this;
  851.     }
  852.     public function getSubsidiaryCompany(): ?SubsidiaryCompany
  853.     {
  854.         return $this->subsidiaryCompany;
  855.     }
  856.     public function setSubsidiaryCompany(?SubsidiaryCompany $subsidiaryCompany): self
  857.     {
  858.         $this->subsidiaryCompany $subsidiaryCompany;
  859.         return $this;
  860.     }
  861.     public function getJob(): ?Job
  862.     {
  863.         return $this->job;
  864.     }
  865.     public function setJob(?Job $job): self
  866.     {
  867.         $this->job $job;
  868.         return $this;
  869.     }
  870.     public function getOffice(): ?Office
  871.     {
  872.         return $this->office;
  873.     }
  874.     public function setOffice(?Office $office): self
  875.     {
  876.         $this->office $office;
  877.         return $this;
  878.     }
  879.     public function getContract(): ?Contract
  880.     {
  881.         return $this->contract;
  882.     }
  883.     public function setContract(?Contract $contract): self
  884.     {
  885.         $this->contract $contract;
  886.         return $this;
  887.     }
  888.     public function getPhoneNumber(): ?string
  889.     {
  890.         return $this->phoneNumber;
  891.     }
  892.     public function setPhoneNumber(?string $phoneNumber): self
  893.     {
  894.         $this->phoneNumber $phoneNumber;
  895.         return $this;
  896.     }
  897.     public function getStatus(): ?string
  898.     {
  899.         return $this->status;
  900.     }
  901.     public function setStatus(?string $status): self
  902.     {
  903.         $this->status $status;
  904.         return $this;
  905.     }
  906.     public function isActive(): ?bool
  907.     {
  908.         return $this->active;
  909.     }
  910.     public function setActive(?bool $active): self
  911.     {
  912.         $this->active $active;
  913.         return $this;
  914.     }
  915.     public function getPhoto(): ?ImageManager
  916.     {
  917.         return $this->photo;
  918.     }
  919.     public function setPhoto(?ImageManager $photo): self
  920.     {
  921.         $this->photo $photo;
  922.         return $this;
  923.     }
  924.     public function getReferent(): ?string
  925.     {
  926.         return $this->referent;
  927.     }
  928.     public function setReferent(?string $referent): self
  929.     {
  930.         $this->referent $referent;
  931.         return $this;
  932.     }
  933.     public function getEntryDate(): ?\DateTimeInterface
  934.     {
  935.         return $this->entryDate;
  936.     }
  937.     public function setEntryDate(?\DateTimeInterface $entryDate): self
  938.     {
  939.         $this->entryDate $entryDate;
  940.         return $this;
  941.     }
  942.     public function getResponsible(): ?self
  943.     {
  944.         return $this->responsible;
  945.     }
  946.     public function setResponsible(?self $responsible): self
  947.     {
  948.         $this->responsible $responsible;
  949.         return $this;
  950.     }
  951.     /**
  952.      * @return Collection<int, self>
  953.      */
  954.     public function getResponsibles(): Collection
  955.     {
  956.         return $this->responsibles;
  957.     }
  958.     public function addResponsible(self $responsible): self
  959.     {
  960.         if (!$this->responsibles->contains($responsible)) {
  961.             $this->responsibles[] = $responsible;
  962.             $responsible->setResponsible($this);
  963.         }
  964.         return $this;
  965.     }
  966.     public function removeResponsible(self $responsible): self
  967.     {
  968.         if ($this->responsibles->removeElement($responsible)) {
  969.             // set the owning side to null (unless already changed)
  970.             if ($responsible->getResponsible() === $this) {
  971.                 $responsible->setResponsible(null);
  972.             }
  973.         }
  974.         return $this;
  975.     }
  976.     /**
  977.      * @return Collection<int, ProgramParticipation>
  978.      */
  979.     public function getProgramParticipations(): Collection
  980.     {
  981.         return $this->programParticipations;
  982.     }
  983.     public function addProgramParticipation(ProgramParticipation $programParticipation): self
  984.     {
  985.         if (!$this->programParticipations->contains($programParticipation)) {
  986.             $this->programParticipations[] = $programParticipation;
  987.             $programParticipation->setCreatedBy($this);
  988.         }
  989.         return $this;
  990.     }
  991.     public function removeProgramParticipation(ProgramParticipation $programParticipation): self
  992.     {
  993.         if ($this->programParticipations->removeElement($programParticipation)) {
  994.             // set the owning side to null (unless already changed)
  995.             if ($programParticipation->getCreatedBy() === $this) {
  996.                 $programParticipation->setCreatedBy(null);
  997.             }
  998.         }
  999.         return $this;
  1000.     }
  1001.     /**
  1002.      * @return Collection<int, ModuleParticipation>
  1003.      */
  1004.     public function getModuleParticipations(): Collection
  1005.     {
  1006.         return $this->moduleParticipations;
  1007.     }
  1008.     public function addModuleParticipation(ModuleParticipation $moduleParticipation): self
  1009.     {
  1010.         if (!$this->moduleParticipations->contains($moduleParticipation)) {
  1011.             $this->moduleParticipations[] = $moduleParticipation;
  1012.             $moduleParticipation->setCreatedBy($this);
  1013.         }
  1014.         return $this;
  1015.     }
  1016.     public function removeModuleParticipation(ModuleParticipation $moduleParticipation): self
  1017.     {
  1018.         if ($this->moduleParticipations->removeElement($moduleParticipation)) {
  1019.             // set the owning side to null (unless already changed)
  1020.             if ($moduleParticipation->getCreatedBy() === $this) {
  1021.                 $moduleParticipation->setCreatedBy(null);
  1022.             }
  1023.         }
  1024.         return $this;
  1025.     }
  1026.     /**
  1027.      * @return Collection<int, ModuleInscription>
  1028.      */
  1029.     public function getModuleInscriptions(): Collection
  1030.     {
  1031.         return $this->moduleInscriptions;
  1032.     }
  1033.     public function addModuleInscription(ModuleInscription $moduleInscription): self
  1034.     {
  1035.         if (!$this->moduleInscriptions->contains($moduleInscription)) {
  1036.             $this->moduleInscriptions[] = $moduleInscription;
  1037.             $moduleInscription->setUser($this);
  1038.         }
  1039.         return $this;
  1040.     }
  1041.     public function removeModuleInscription(ModuleInscription $moduleInscription): self
  1042.     {
  1043.         if ($this->moduleInscriptions->removeElement($moduleInscription)) {
  1044.             // set the owning side to null (unless already changed)
  1045.             if ($moduleInscription->getUser() === $this) {
  1046.                 $moduleInscription->setUser(null);
  1047.             }
  1048.         }
  1049.         return $this;
  1050.     }
  1051.     /** @see \Serializable::serialize() */
  1052.     public function serialize()
  1053.     {
  1054.          return serialize(array(
  1055.              $this->id,
  1056.              $this->email,
  1057.              $this->password,
  1058.              // see section on salt below
  1059.              // $this->salt,
  1060.          ));
  1061.     }
  1062.     /** @see \Serializable::serialize() */
  1063.     public function __serialize()
  1064.     {
  1065.          return array(
  1066.              $this->id,
  1067.              $this->email,
  1068.              $this->password,
  1069.              // see section on salt below
  1070.              // $this->salt,
  1071.          );
  1072.     }
  1073.  
  1074.     /** @see \Serializable::unserialize() */
  1075.     public function unserialize($serialized)
  1076.     {
  1077.          list (
  1078.              $this->id,
  1079.              $this->email,
  1080.              $this->password,
  1081.              // see section on salt below
  1082.              // $this->salt
  1083.          ) = unserialize($serialized);
  1084.     }
  1085.     /** @see \Serializable::unserialize() */
  1086.     public function __unserialize($serialized)
  1087.     {
  1088.          list (
  1089.              $this->id,
  1090.              $this->email,
  1091.              $this->password,
  1092.              // see section on salt below
  1093.              // $this->salt
  1094.          ) = unserialize(serialize($serialized));
  1095.     }
  1096.     public function getActivationCode(): ?string
  1097.     {
  1098.         return $this->activationCode;
  1099.     }
  1100.     public function setActivationCode(?string $activationCode): self
  1101.     {
  1102.         $this->activationCode $activationCode;
  1103.         return $this;
  1104.     }
  1105.     public function getActivationCodeExpiredAt(): ?\DateTimeInterface
  1106.     {
  1107.         return $this->activationCodeExpiredAt;
  1108.     }
  1109.     public function setActivationCodeExpiredAt(?\DateTimeInterface $activationCodeExpiredAt): self
  1110.     {
  1111.         $this->activationCodeExpiredAt $activationCodeExpiredAt;
  1112.         return $this;
  1113.     }
  1114.     public function getResetCode(): ?string
  1115.     {
  1116.         return $this->resetCode;
  1117.     }
  1118.     public function setResetCode(?string $resetCode): self
  1119.     {
  1120.         $this->resetCode $resetCode;
  1121.         return $this;
  1122.     }
  1123.     public function getResetCodeExpiredAt(): ?\DateTimeInterface
  1124.     {
  1125.         return $this->resetCodeExpiredAt;
  1126.     }
  1127.     public function setResetCodeExpiredAt(?\DateTimeInterface $resetCodeExpiredAt): self
  1128.     {
  1129.         $this->resetCodeExpiredAt $resetCodeExpiredAt;
  1130.         return $this;
  1131.     }
  1132.     public function getDeviceTokens(): ?array
  1133.     {
  1134.         return $this->deviceTokens;
  1135.     }
  1136.     public function setDeviceTokens(?array $deviceTokens): self
  1137.     {
  1138.         $this->deviceTokens $deviceTokens;
  1139.         return $this;
  1140.     }
  1141.     /**
  1142.      * @return Collection<int, Discussion>
  1143.      */
  1144.     public function getSenderDiscussions(): Collection
  1145.     {
  1146.         return $this->senderDiscussions;
  1147.     }
  1148.     public function addSenderDiscussion(Discussion $senderDiscussion): self
  1149.     {
  1150.         if (!$this->senderDiscussions->contains($senderDiscussion)) {
  1151.             $this->senderDiscussions[] = $senderDiscussion;
  1152.             $senderDiscussion->setCreatedBy($this);
  1153.         }
  1154.         return $this;
  1155.     }
  1156.     public function removeSenderDiscussion(Discussion $senderDiscussion): self
  1157.     {
  1158.         if ($this->senderDiscussions->removeElement($senderDiscussion)) {
  1159.             // set the owning side to null (unless already changed)
  1160.             if ($senderDiscussion->getCreatedBy() === $this) {
  1161.                 $senderDiscussion->setCreatedBy(null);
  1162.             }
  1163.         }
  1164.         return $this;
  1165.     }
  1166.     /**
  1167.      * @return Collection<int, Discussion>
  1168.      */
  1169.     public function getReceiverDiscussions(): Collection
  1170.     {
  1171.         return $this->receiverDiscussions;
  1172.     }
  1173.     public function addReceiverDiscussion(Discussion $receiverDiscussion): self
  1174.     {
  1175.         if (!$this->receiverDiscussions->contains($receiverDiscussion)) {
  1176.             $this->receiverDiscussions[] = $receiverDiscussion;
  1177.             $receiverDiscussion->setCreatedBy($this);
  1178.         }
  1179.         return $this;
  1180.     }
  1181.     public function removeReceiverDiscussion(Discussion $receiverDiscussion): self
  1182.     {
  1183.         if ($this->receiverDiscussions->removeElement($receiverDiscussion)) {
  1184.             // set the owning side to null (unless already changed)
  1185.             if ($receiverDiscussion->getCreatedBy() === $this) {
  1186.                 $receiverDiscussion->setCreatedBy(null);
  1187.             }
  1188.         }
  1189.         return $this;
  1190.     }
  1191.     /**
  1192.      * @return Collection<int, Message>
  1193.      */
  1194.     public function getMessages(): Collection
  1195.     {
  1196.         return $this->messages;
  1197.     }
  1198.     public function addMessage(Message $message): self
  1199.     {
  1200.         if (!$this->messages->contains($message)) {
  1201.             $this->messages[] = $message;
  1202.             $message->setReceiver($this);
  1203.         }
  1204.         return $this;
  1205.     }
  1206.     public function removeMessage(Message $message): self
  1207.     {
  1208.         if ($this->messages->removeElement($message)) {
  1209.             // set the owning side to null (unless already changed)
  1210.             if ($message->getReceiver() === $this) {
  1211.                 $message->setReceiver(null);
  1212.             }
  1213.         }
  1214.         return $this;
  1215.     }
  1216.     public function isVerified(): bool
  1217.     {
  1218.         return $this->isVerified;
  1219.     }
  1220.     public function setIsVerified(bool $isVerified): self
  1221.     {
  1222.         $this->isVerified $isVerified;
  1223.         return $this;
  1224.     }
  1225.     public function getProfileColor(): ?string
  1226.     {
  1227.         return $this->profileColor;
  1228.     }
  1229.     public function setProfileColor(?string $profileColor): self
  1230.     {
  1231.         $this->profileColor $profileColor;
  1232.         return $this;
  1233.     }
  1234.     /**
  1235.      * @return Collection<int, Program>
  1236.      */
  1237.     public function getPrograms(): Collection
  1238.     {
  1239.         return $this->programs;
  1240.     }
  1241.     public function addProgram(Program $program): self
  1242.     {
  1243.         if (!$this->programs->contains($program)) {
  1244.             $this->programs[] = $program;
  1245.             $program->addUser($this);
  1246.         }
  1247.         return $this;
  1248.     }
  1249.     public function removeProgram(Program $program): self
  1250.     {
  1251.         if ($this->programs->removeElement($program)) {
  1252.             $program->removeUser($this);
  1253.         }
  1254.         return $this;
  1255.     }
  1256.     /**
  1257.      * @return Collection<int, UserModuleParticipation>
  1258.      */
  1259.     public function getUserModuleParticipations(): Collection
  1260.     {
  1261.         return $this->userModuleParticipations;
  1262.     }
  1263.     public function addUserModuleParticipation(UserModuleParticipation $userModuleParticipation): self
  1264.     {
  1265.         if (!$this->userModuleParticipations->contains($userModuleParticipation)) {
  1266.             $this->userModuleParticipations[] = $userModuleParticipation;
  1267.             $userModuleParticipation->setParticipant($this);
  1268.         }
  1269.         return $this;
  1270.     }
  1271.     public function removeUserModuleParticipation(UserModuleParticipation $userModuleParticipation): self
  1272.     {
  1273.         if ($this->userModuleParticipations->removeElement($userModuleParticipation)) {
  1274.             // set the owning side to null (unless already changed)
  1275.             if ($userModuleParticipation->getParticipant() === $this) {
  1276.                 $userModuleParticipation->setParticipant(null);
  1277.             }
  1278.         }
  1279.         return $this;
  1280.     }
  1281.     public function isIsInternalAccount(): ?bool
  1282.     {
  1283.         return $this->isInternalAccount;
  1284.     }
  1285.     public function setIsInternalAccount(?bool $isInternalAccount): self
  1286.     {
  1287.         $this->isInternalAccount $isInternalAccount;
  1288.         return $this;
  1289.     }
  1290.     public function getElapsedTime(): ?int
  1291.     {
  1292.         return $this->elapsedTime;
  1293.     }
  1294.     public function setElapsedTime(?int $elapsedTime): self
  1295.     {
  1296.         $this->elapsedTime $elapsedTime;
  1297.         return $this;
  1298.     }
  1299.     /**
  1300.      * @return Collection<int, Notification>
  1301.      */
  1302.     public function getNotifications(): Collection
  1303.     {
  1304.         return $this->notifications;
  1305.     }
  1306.     public function addNotification(Notification $notification): self
  1307.     {
  1308.         if (!$this->notifications->contains($notification)) {
  1309.             $this->notifications[] = $notification;
  1310.             $notification->setReceiver($this);
  1311.         }
  1312.         return $this;
  1313.     }
  1314.     public function removeNotification(Notification $notification): self
  1315.     {
  1316.         if ($this->notifications->removeElement($notification)) {
  1317.             // set the owning side to null (unless already changed)
  1318.             if ($notification->getReceiver() === $this) {
  1319.                 $notification->setReceiver(null);
  1320.             }
  1321.         }
  1322.         return $this;
  1323.     }
  1324.     /**
  1325.      * @return Collection<int, NotificationReceiver>
  1326.      */
  1327.     public function getNotificationReceivers(): Collection
  1328.     {
  1329.         return $this->notificationReceivers;
  1330.     }
  1331.     public function addNotificationReceiver(NotificationReceiver $notificationReceiver): self
  1332.     {
  1333.         if (!$this->notificationReceivers->contains($notificationReceiver)) {
  1334.             $this->notificationReceivers[] = $notificationReceiver;
  1335.             $notificationReceiver->setReceiver($this);
  1336.         }
  1337.         return $this;
  1338.     }
  1339.     public function removeNotificationReceiver(NotificationReceiver $notificationReceiver): self
  1340.     {
  1341.         if ($this->notificationReceivers->removeElement($notificationReceiver)) {
  1342.             // set the owning side to null (unless already changed)
  1343.             if ($notificationReceiver->getReceiver() === $this) {
  1344.                 $notificationReceiver->setReceiver(null);
  1345.             }
  1346.         }
  1347.         return $this;
  1348.     }
  1349.     public function getLastLoginNotifiedAt(): ?\DateTimeInterface
  1350.     {
  1351.         return $this->lastLoginNotifiedAt;
  1352.     }
  1353.     public function setLastLoginNotifiedAt(?\DateTimeInterface $lastLoginNotifiedAt): self
  1354.     {
  1355.         $this->lastLoginNotifiedAt $lastLoginNotifiedAt;
  1356.         return $this;
  1357.     }
  1358.     /**
  1359.      * @return Collection<int, Message>
  1360.      */
  1361.     public function getReceiverMessages(): Collection
  1362.     {
  1363.         return $this->receiverMessages;
  1364.     }
  1365.     public function addReceiverMessage(Message $receiverMessage): self
  1366.     {
  1367.         if (!$this->receiverMessages->contains($receiverMessage)) {
  1368.             $this->receiverMessages[] = $receiverMessage;
  1369.             $receiverMessage->setReceiver($this);
  1370.         }
  1371.         return $this;
  1372.     }
  1373.     public function removeReceiverMessage(Message $receiverMessage): self
  1374.     {
  1375.         if ($this->receiverMessages->removeElement($receiverMessage)) {
  1376.             // set the owning side to null (unless already changed)
  1377.             if ($receiverMessage->getReceiver() === $this) {
  1378.                 $receiverMessage->setReceiver(null);
  1379.             }
  1380.         }
  1381.         return $this;
  1382.     }
  1383.     /**
  1384.      * @return Collection<int, UserQuizParticipation>
  1385.      */
  1386.     public function getUserQuizParticipations(): Collection
  1387.     {
  1388.         return $this->userQuizParticipations;
  1389.     }
  1390.     public function addUserQuizParticipation(UserQuizParticipation $userQuizParticipation): self
  1391.     {
  1392.         if (!$this->userQuizParticipations->contains($userQuizParticipation)) {
  1393.             $this->userQuizParticipations[] = $userQuizParticipation;
  1394.             $userQuizParticipation->setUser($this);
  1395.         }
  1396.         return $this;
  1397.     }
  1398.     public function removeUserQuizParticipation(UserQuizParticipation $userQuizParticipation): self
  1399.     {
  1400.         if ($this->userQuizParticipations->removeElement($userQuizParticipation)) {
  1401.             // set the owning side to null (unless already changed)
  1402.             if ($userQuizParticipation->getUser() === $this) {
  1403.                 $userQuizParticipation->setUser(null);
  1404.             }
  1405.         }
  1406.         return $this;
  1407.     }
  1408. }