src/Entity/User.php line 21

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Entity\Media\Media;
  4. use App\Entity\Media\MediaBlockedByUser;
  5. use App\Entity\Media\MediaTeam;
  6. use App\Entity\Post\PostHiddenByUser;
  7. use App\Entity\Program\ProgramBlockedByUser;
  8. use App\Entity\Program\ProgramCrewMember;
  9. use Doctrine\Common\Collections\ArrayCollection;
  10. use Doctrine\Common\Collections\Collection;
  11. use Doctrine\ORM\Mapping as ORM;
  12. use Symfony\Component\Security\Core\User\UserInterface;
  13. use App\Entity\User\Wallet;
  14. /**
  15.  * @ORM\Entity(repositoryClass="App\Repository\UserRepository")
  16.  * @ORM\HasLifecycleCallbacks()
  17.  */
  18. class User extends BaseEntity implements UserInterface
  19. {
  20.     /**
  21.      * @ORM\Column(type="string", length=180, unique=true)
  22.      */
  23.     private $email;
  24.     /**
  25.      * @ORM\Column(type="boolean", options={"default" = false})
  26.      */
  27.     private $emailConfirmed;
  28.     /**
  29.      * @ORM\Column(type="boolean", options={"default" = false})
  30.      */
  31.     private $hideEmail;
  32.     /**
  33.      * @ORM\Column(type="integer", nullable=true)
  34.      */
  35.     private $emailConfirmedRecover;
  36.     /**
  37.      * @ORM\Column(type="string", length=180, unique=true)
  38.      */
  39.     private $username;
  40.     /**
  41.      * @ORM\Column(type="string", length=180, nullable=true)
  42.      */
  43.     private $firstname;
  44.     /**
  45.      * @ORM\Column(type="string", length=180, nullable=true)
  46.      */
  47.     private $tel;
  48.     /**
  49.      * @ORM\Column(type="string", length=180, nullable=true)
  50.      */
  51.     private $address;
  52.     /**
  53.      * @ORM\Column(type="string", length=180, nullable=true)
  54.      */
  55.     private $website;
  56.     /**
  57.      * @ORM\Column(type="integer", nullable=true)
  58.      */
  59.     private $following;
  60.     /**
  61.      * @ORM\Column(type="integer", nullable=true)
  62.      */
  63.     private $participations;
  64.     /**
  65.      * @ORM\Column(type="string", length=180, nullable=true)
  66.      */
  67.     private $lastname;
  68.     /**
  69.      * @ORM\Column(type="json", length=255, nullable=true)
  70.      */
  71.     private $languages;
  72.     /**
  73.      * @ORM\Column(type="json")
  74.      */
  75.     private $roles = [];
  76.     /**
  77.      * @var string The hashed password
  78.      * @ORM\Column(type="string", nullable=true)
  79.      */
  80.     private $password;
  81.     /**
  82.      * @ORM\Column(type="string", nullable=true)
  83.      */
  84.     private $picture;
  85.     /**
  86.      * @ORM\OneToMany(targetEntity="App\Entity\Program\ProgramCrewMember",mappedBy="user",cascade={"persist"})
  87.      */
  88.     private $crews;
  89.     /**
  90.      * @ORM\OneToMany(targetEntity="App\Entity\Media\MediaTeam", mappedBy="user",cascade={"persist"})
  91.      */
  92.     private $mediaTeams;
  93.     /**
  94.      * @ORM\OneToMany(targetEntity="App\Entity\Media\Media", mappedBy="createdBy")
  95.      */
  96.     private $mediasCreated;
  97.     /**
  98.      * @ORM\Column(type="string", unique=true, nullable=true)
  99.     */
  100.     private $apiToken;
  101.     /**
  102.      * @ORM\Column(type="string", length=255, nullable=true)
  103.      */
  104.     private $facebook;
  105.     /**
  106.      * @ORM\Column(type="string", length=255, nullable=true)
  107.      */
  108.     private $facebookId;
  109.     /**
  110.      * @ORM\Column(type="string", length=255, nullable=true)
  111.      */
  112.     private $facebookToken;
  113.     /**
  114.      * @ORM\Column(type="string", length=255, nullable=true)
  115.      */
  116.     private $googleId;
  117.     /**
  118.      * @ORM\Column(type="string", length=255, nullable=true)
  119.      */
  120.     private $googleToken;
  121.     /**
  122.      * @ORM\Column(type="string", length=255, nullable=true)
  123.      */
  124.     private $instagram;
  125.     /**
  126.      * @ORM\Column(type="string", length=255, nullable=true)
  127.      */
  128.     private $instagramId;
  129.     /**
  130.      * @ORM\Column(type="string", length=255, nullable=true)
  131.      */
  132.     private $instagramToken;
  133.     /**
  134.      * @ORM\Column(type="string", length=255, nullable=true)
  135.      */
  136.     private $twitter;
  137.     /**
  138.      * @ORM\Column(type="string", length=255, nullable=true)
  139.      */
  140.     private $twitterId;
  141.     /**
  142.      * @ORM\Column(type="string", length=255, nullable=true)
  143.      */
  144.     private $twitterToken;
  145.     /**
  146.      * @ORM\Column(type="string", length=255, nullable=true)
  147.      */
  148.     private $snapchat;
  149.     /**
  150.      * @ORM\Column(type="string", length=255, nullable=true)
  151.      */
  152.     private $snapchatId;
  153.     /**
  154.      * @ORM\Column(type="string", length=255, nullable=true)
  155.      */
  156.     private $snapchatToken;
  157.     /**
  158.      * @ORM\Column(type="string", length=255, nullable=true)
  159.      */
  160.     private $youtube;
  161.     /**
  162.      * @ORM\Column(type="string", length=255, nullable=true)
  163.      */
  164.     private $youtubeId;
  165.     /**
  166.      * @ORM\Column(type="string", length=255, nullable=true)
  167.      */
  168.     private $youtubeToken;
  169.     /**
  170.      * @ORM\Column(type="string", length=255, nullable=true))
  171.      */
  172.     private $passwordRecover;
  173.     /**
  174.      * @ORM\Column(type="datetime", nullable=true)
  175.      */
  176.     protected $lastLogin;
  177.     /**
  178.      * @ORM\Column(type="datetime", nullable=true)
  179.      */
  180.     protected $dateOfBirth;
  181.     /**
  182.      * @ORM\Column(type="string", length=255, nullable=true))
  183.      */
  184.     private $nationality;
  185.     //Postal address
  186.     /**
  187.      * @ORM\Column(type="string", length=255, nullable=true)
  188.      * pays
  189.      */
  190.     private $country;
  191.     /**
  192.      * @ORM\Column(type="string", length=255, nullable=false)
  193.      */
  194.     private $zone;
  195.     /**
  196.      * @ORM\Column(type="string", length=255, nullable=true)
  197.      */
  198.     private $zipCode;
  199.     /**
  200.      * @ORM\Column(type="string", length=255, nullable=true)
  201.      */
  202.     private $address1;
  203.     /**
  204.      * @ORM\Column(type="string", length=255, nullable=true)
  205.      */
  206.     private $address2;
  207.     /**
  208.      * @ORM\Column(type="string", length=255, nullable=true)
  209.      */
  210.     private $address3;
  211.     /**
  212.      * @ORM\Column(type="integer", nullable=true)
  213.      */
  214.     private $civility;
  215.     /**
  216.      * @ORM\Column(type="string", length=255, nullable=true)
  217.      */
  218.     private $city;
  219.     /**
  220.      * @ORM\OneToOne(targetEntity=Adhesion::class, mappedBy="user", cascade={"persist", "remove"})
  221.      */
  222.     private $adhesion;
  223.     /**
  224.      * @ORM\OneToOne(targetEntity=Wallet::class, mappedBy="user", cascade={"persist", "remove"})
  225.      */
  226.     private $wallet;
  227.     /**
  228.      * @ORM\OneToMany(targetEntity=Shortcut::class, mappedBy="user")
  229.      */
  230.     private $shortcuts;
  231.     /**
  232.      * @ORM\OneToMany(targetEntity="App\Entity\Media\MediaBlockedByUser", mappedBy="user")
  233.      */
  234.     private $mediasBlockedByUser;
  235.     /**
  236.      * @ORM\OneToMany(targetEntity="App\Entity\Program\ProgramBlockedByUser", mappedBy="user")
  237.      */
  238.     private $programsBlockedByUser;
  239.     /**
  240.      * @ORM\OneToMany(targetEntity="App\Entity\Post\PostHiddenByUser", mappedBy="user")
  241.      */
  242.     private $postsHiddenByUser;
  243.     /**
  244.      * @ORM\OneToMany(targetEntity="App\Entity\UserBlockedByUser", mappedBy="madeBy")
  245.      */
  246.     private $usersBlockedByUser;
  247.     public function __construct()
  248.     {
  249.         $this->mediaTeams = new ArrayCollection();
  250.         $this->mediasCreated = new ArrayCollection();
  251.         $this->crews = new ArrayCollection();
  252.         $this->emailConfirmed false;
  253.         $this->shortcuts = new ArrayCollection();
  254.         $this->mediasBlockedByUser = new ArrayCollection();
  255.         $this->programsBlockedByUser = new ArrayCollection();
  256.         $this->postsHiddenByUser = new ArrayCollection();
  257.         $this->usersBlockedByUser = new ArrayCollection();
  258.         $this->hideEmail false;
  259.     }
  260.     public function getId(): ?int
  261.     {
  262.         return $this->id;
  263.     }
  264.     public function getEmail(): ?string
  265.     {
  266.         return $this->email;
  267.     }
  268.     public function setEmail(string $email): self
  269.     {
  270.         $this->email $email;
  271.         return $this;
  272.     }
  273.     /**
  274.      * A visual identifier that represents this user.
  275.      *
  276.      * @see UserInterface
  277.      */
  278.     public function getUsername(): string
  279.     {
  280.         return (string) $this->username;
  281.     }
  282.     /**
  283.      * Stable identifier used by Symfony's authenticator manager.
  284.      */
  285.     public function getUserIdentifier(): string
  286.     {
  287.         return (string) $this->email;
  288.     }
  289.     /**
  290.      * @see UserInterface
  291.      */
  292.     public function getRoles(): array
  293.     {
  294.         $roles $this->roles;
  295.         // guarantee every user at least has ROLE_USER
  296.         $roles[] = 'ROLE_USER';
  297.         return array_unique($roles);
  298.     }
  299.     public function addRole(string $role): self
  300.     {
  301.         $this->roles[] = $role;
  302.         return $this;
  303.     }
  304.     public function setRoles(array $roles): self
  305.     {
  306.         $this->roles $roles;
  307.         return $this;
  308.     }
  309.     public function hasRole(string $role): bool
  310.     {
  311.         return in_array($role$this->roles);
  312.     }
  313.     public function removeRole(string $role): self
  314.     {
  315.         if (($key array_search($role$this->roles)) !== false) {
  316.             unset($this->roles[$key]);
  317.         }
  318.         return $this;
  319.     }
  320.     /**
  321.      * @see UserInterface
  322.      */
  323.     public function getPassword(): string
  324.     {
  325.         return (string) $this->password;
  326.     }
  327.     public function setPassword(?string $password): self
  328.     {
  329.         $this->password $password;
  330.         return $this;
  331.     }
  332.     /**
  333.      * @see UserInterface
  334.      */
  335.     public function getSalt(): ?string
  336.     {
  337.         // not needed when using the "bcrypt" algorithm in security.yaml
  338.         return null;
  339.     }
  340.     /**
  341.      * @see UserInterface
  342.      */
  343.     public function eraseCredentials(): void
  344.     {
  345.         // If you store any temporary, sensitive data on the user, clear it here
  346.         // $this->plainPassword = null;
  347.     }
  348.     /**
  349.      * @return Collection|MediaTeam[]
  350.      */
  351.     public function getMediaTeams(): Collection
  352.     {
  353.         return $this->mediaTeams;
  354.     }
  355.     public function addMediaTeam(MediaTeam $mediaTeam): self
  356.     {
  357.         if (!$this->mediaTeams->contains($mediaTeam)) {
  358.             $this->mediaTeams[] = $mediaTeam;
  359.             $mediaTeam->setUser($this);
  360.         }
  361.         return $this;
  362.     }
  363.     public function removeMediaTeam(MediaTeam $mediaTeam): self
  364.     {
  365.         if ($this->mediaTeams->contains($mediaTeam)) {
  366.             $this->mediaTeams->removeElement($mediaTeam);
  367.             // set the owning side to null (unless already changed)
  368.             if ($mediaTeam->getUser() === $this) {
  369.                 $mediaTeam->setUser(null);
  370.             }
  371.         }
  372.         return $this;
  373.     }
  374.     /**
  375.      * @return Collection|Media[]
  376.      */
  377.     public function getMediasCreated(): Collection
  378.     {
  379.         return $this->mediasCreated;
  380.     }
  381.     public function addMediasCreated(Media $mediasCreated): self
  382.     {
  383.         if (!$this->mediasCreated->contains($mediasCreated)) {
  384.             $this->mediasCreated[] = $mediasCreated;
  385.             $mediasCreated->setCreatedBy($this);
  386.         }
  387.         return $this;
  388.     }
  389.     public function removeMediasCreated(Media $mediasCreated): self
  390.     {
  391.         if ($this->mediasCreated->contains($mediasCreated)) {
  392.             $this->mediasCreated->removeElement($mediasCreated);
  393.             // set the owning side to null (unless already changed)
  394.             if ($mediasCreated->getCreatedBy() === $this) {
  395.                 $mediasCreated->setCreatedBy(null);
  396.             }
  397.         }
  398.         return $this;
  399.     }
  400.     public function __toString(){
  401.         return $this->username;
  402.     }
  403.     public function getApiToken(): ?string
  404.     {
  405.         return $this->apiToken;
  406.     }
  407.     public function setApiToken(?string $apiToken): self
  408.     {
  409.         $this->apiToken $apiToken;
  410.         return $this;
  411.     }
  412.     public function setUsername(string $username): self
  413.     {
  414.         $this->username $username;
  415.         return $this;
  416.     }
  417.     public function getCountry(): ?string
  418.     {
  419.         return $this->country;
  420.     }
  421.     public function setCountry(?string $country): self
  422.     {
  423.         $this->country $country;
  424.         return $this;
  425.     }
  426.     public function getLanguages(): ?array
  427.     {
  428.         return $this->languages;
  429.     }
  430.     public function setLanguages(?array $languages): self
  431.     {
  432.         $this->languages $languages;
  433.         return $this;
  434.     }
  435.     public function getFacebook(): ?string
  436.     {
  437.         return $this->facebook;
  438.     }
  439.     public function setFacebook(?string $facebook): self
  440.     {
  441.         $this->facebook $facebook;
  442.         return $this;
  443.     }
  444.     public function getInstagram(): ?string
  445.     {
  446.         return $this->instagram;
  447.     }
  448.     public function setInstagram(?string $instagram): self
  449.     {
  450.         $this->instagram $instagram;
  451.         return $this;
  452.     }
  453.     public function getTwitter(): ?string
  454.     {
  455.         return $this->twitter;
  456.     }
  457.     public function setTwitter(?string $twitter): self
  458.     {
  459.         $this->twitter $twitter;
  460.         return $this;
  461.     }
  462.     public function getSnapchat(): ?string
  463.     {
  464.         return $this->snapchat;
  465.     }
  466.     public function setSnapchat(?string $snapchat): self
  467.     {
  468.         $this->snapchat $snapchat;
  469.         return $this;
  470.     }
  471.     public function getYoutube(): ?string
  472.     {
  473.         return $this->youtube;
  474.     }
  475.     public function setYoutube(?string $youtube): self
  476.     {
  477.         $this->youtube $youtube;
  478.         return $this;
  479.     }
  480.     public function getFirstname(): ?string
  481.     {
  482.         return $this->firstname;
  483.     }
  484.     public function setFirstname(string $firstname): self
  485.     {
  486.         $this->firstname $firstname;
  487.         return $this;
  488.     }
  489.     public function getTel(): ?string
  490.     {
  491.         return $this->tel;
  492.     }
  493.     public function setTel(string $tel): self
  494.     {
  495.         $this->tel $tel;
  496.         return $this;
  497.     }
  498.     public function getAddress(): ?string
  499.     {
  500.         return $this->address;
  501.     }
  502.     public function setAddress(string $address): self
  503.     {
  504.         $this->address $address;
  505.         return $this;
  506.     }
  507.     public function getWebsite(): ?string
  508.     {
  509.         return $this->website;
  510.     }
  511.     public function setWebsite(string $website): self
  512.     {
  513.         $this->website $website;
  514.         return $this;
  515.     }
  516.     public function getFollowing(): ?int
  517.     {
  518.         return $this->following;
  519.     }
  520.     public function setFollowing(int $following): self
  521.     {
  522.         $this->following $following;
  523.         return $this;
  524.     }
  525.     public function getParticipations(): ?int
  526.     {
  527.         return $this->participations;
  528.     }
  529.     public function setParticipations(int $participations): self
  530.     {
  531.         $this->participations $participations;
  532.         return $this;
  533.     }
  534.     public function getLastname(): ?string
  535.     {
  536.         return $this->lastname;
  537.     }
  538.     public function setLastname(string $lastname): self
  539.     {
  540.         $this->lastname $lastname;
  541.         return $this;
  542.     }
  543.     public function getFacebookId(): ?string
  544.     {
  545.         return $this->facebookId;
  546.     }
  547.     public function setFacebookId(?string $facebookId): self
  548.     {
  549.         $this->facebookId $facebookId;
  550.         return $this;
  551.     }
  552.     public function getFacebookToken(): ?string
  553.     {
  554.         return $this->facebookToken;
  555.     }
  556.     public function setFacebookToken(?string $facebookToken): self
  557.     {
  558.         $this->facebookToken $facebookToken;
  559.         return $this;
  560.     }
  561.     public function getInstagramId(): ?string
  562.     {
  563.         return $this->instagramId;
  564.     }
  565.     public function setInstagramId(?string $instagramId): self
  566.     {
  567.         $this->instagramId $instagramId;
  568.         return $this;
  569.     }
  570.     public function getInstagramToken(): ?string
  571.     {
  572.         return $this->instagramToken;
  573.     }
  574.     public function setInstagramToken(?string $instagramToken): self
  575.     {
  576.         $this->instagramToken $instagramToken;
  577.         return $this;
  578.     }
  579.     public function getTwitterId(): ?string
  580.     {
  581.         return $this->twitterId;
  582.     }
  583.     public function setTwitterId(?string $twitterId): self
  584.     {
  585.         $this->twitterId $twitterId;
  586.         return $this;
  587.     }
  588.     public function getTwitterToken(): ?string
  589.     {
  590.         return $this->twitterToken;
  591.     }
  592.     public function setTwitterToken(?string $twitterToken): self
  593.     {
  594.         $this->twitterToken $twitterToken;
  595.         return $this;
  596.     }
  597.     public function getSnapchatId(): ?string
  598.     {
  599.         return $this->snapchatId;
  600.     }
  601.     public function setSnapchatId(?string $snapchatId): self
  602.     {
  603.         $this->snapchatId $snapchatId;
  604.         return $this;
  605.     }
  606.     public function getSnapchatToken(): ?string
  607.     {
  608.         return $this->snapchatToken;
  609.     }
  610.     public function setSnapchatToken(?string $snapchatToken): self
  611.     {
  612.         $this->snapchatToken $snapchatToken;
  613.         return $this;
  614.     }
  615.     public function getYoutubeId(): ?string
  616.     {
  617.         return $this->youtubeId;
  618.     }
  619.     public function setYoutubeId(?string $youtubeId): self
  620.     {
  621.         $this->youtubeId $youtubeId;
  622.         return $this;
  623.     }
  624.     public function getYoutubeToken(): ?string
  625.     {
  626.         return $this->youtubeToken;
  627.     }
  628.     public function setYoutubeToken(?string $youtubeToken): self
  629.     {
  630.         $this->youtubeToken $youtubeToken;
  631.         return $this;
  632.     }
  633.     /**
  634.      * @return Collection|ProgramCrewMember[]
  635.      */
  636.     public function getCrews(): Collection
  637.     {
  638.         return $this->crews;
  639.     }
  640.     public function addCrew(ProgramCrewMember $crew): self
  641.     {
  642.         if (!$this->crews->contains($crew)) {
  643.             $this->crews[] = $crew;
  644.             $crew->setUser($this);
  645.         }
  646.         return $this;
  647.     }
  648.     public function removeCrew(ProgramCrewMember $crew): self
  649.     {
  650.         if ($this->crews->contains($crew)) {
  651.             $this->crews->removeElement($crew);
  652.             // set the owning side to null (unless already changed)
  653.             if ($crew->getUser() === $this) {
  654.                 $crew->setUser(null);
  655.             }
  656.         }
  657.         return $this;
  658.     }
  659.     public function getGoogleId(): ?string
  660.     {
  661.         return $this->googleId;
  662.     }
  663.     public function setGoogleId(?string $googleId): self
  664.     {
  665.         $this->googleId $googleId;
  666.         return $this;
  667.     }
  668.     public function getGoogleToken(): ?string
  669.     {
  670.         return $this->googleToken;
  671.     }
  672.     public function setGoogleToken(?string $googleToken): self
  673.     {
  674.         $this->googleToken $googleToken;
  675.         return $this;
  676.     }
  677.     public function getPasswordRecover(): ?string
  678.     {
  679.         return $this->passwordRecover;
  680.     }
  681.     public function setPasswordRecover(?string $passwordRecover): self
  682.     {
  683.         $this->passwordRecover $passwordRecover;
  684.         return $this;
  685.     }
  686.     public function getEmailConfirmed(): ?bool
  687.     {
  688.         return $this->emailConfirmed;
  689.     }
  690.     public function setEmailConfirmed(bool $emailConfirmed): self
  691.     {
  692.         $this->emailConfirmed $emailConfirmed;
  693.         return $this;
  694.     }
  695.     public function getEmailConfirmedRecover(): ?int
  696.     {
  697.         return $this->emailConfirmedRecover;
  698.     }
  699.     public function setEmailConfirmedRecover(?int $emailConfirmedRecover): self
  700.     {
  701.         $this->emailConfirmedRecover $emailConfirmedRecover;
  702.         return $this;
  703.     }
  704.     public function getLastLogin(): ?\DateTimeInterface
  705.     {
  706.         return $this->lastLogin;
  707.     }
  708.     public function setLastLogin(?\DateTimeInterface $lastLogin): self
  709.     {
  710.         $this->lastLogin $lastLogin;
  711.         return $this;
  712.     }
  713.     public function getDateOfBirth(): ?\DateTimeInterface
  714.     {
  715.         return $this->dateOfBirth;
  716.     }
  717.     public function setDateOfBirth(?\DateTimeInterface $dateOfBirth): self
  718.     {
  719.         $this->dateOfBirth $dateOfBirth;
  720.         return $this;
  721.     }
  722.     public function getNationality(): ?string
  723.     {
  724.         return $this->nationality;
  725.     }
  726.     public function setNationality(?string $nationality): self
  727.     {
  728.         $this->nationality $nationality;
  729.         return $this;
  730.     }
  731.     public function getZipCode(): ?string
  732.     {
  733.         return $this->zipCode;
  734.     }
  735.     public function setZipCode(?string $zipCode): self
  736.     {
  737.         $this->zipCode $zipCode;
  738.         return $this;
  739.     }
  740.     public function getAddress1(): ?string
  741.     {
  742.         return $this->address1;
  743.     }
  744.     public function setAddress1(?string $address1): self
  745.     {
  746.         $this->address1 $address1;
  747.         return $this;
  748.     }
  749.     public function getAddress2(): ?string
  750.     {
  751.         return $this->address2;
  752.     }
  753.     public function setAddress2(?string $address2): self
  754.     {
  755.         $this->address2 $address2;
  756.         return $this;
  757.     }
  758.     public function getAddress3(): ?string
  759.     {
  760.         return $this->address3;
  761.     }
  762.     public function setAddress3(?string $address3): self
  763.     {
  764.         $this->address3 $address3;
  765.         return $this;
  766.     }
  767.     public function getCivility(): ?int
  768.     {
  769.         return $this->civility;
  770.     }
  771.     public function setCivility(?int $civility): self
  772.     {
  773.         $this->civility $civility;
  774.         return $this;
  775.     }
  776.     public function getCity(): ?string
  777.     {
  778.         return $this->city;
  779.     }
  780.     public function setCity(?string $city): self
  781.     {
  782.         $this->city $city;
  783.         return $this;
  784.     }
  785.     public function getPicture(): ?string
  786.     {
  787.         return $this->picture;
  788.     }
  789.     public function setPicture(?string $picture): self
  790.     {
  791.         $this->picture $picture;
  792.         return $this;
  793.     }
  794.     public function getAdhesion(): ?Adhesion
  795.     {
  796.         return $this->adhesion;
  797.     }
  798.     public function setAdhesion(Adhesion $adhesion): self
  799.     {
  800.         // set the owning side of the relation if necessary
  801.         if ($adhesion->getUser() !== $this) {
  802.             $adhesion->setUser($this);
  803.         }
  804.         $this->adhesion $adhesion;
  805.         return $this;
  806.     }
  807.     /**
  808.      * @return Collection|Shortcut[]
  809.      */
  810.     public function getShortcuts(): Collection
  811.     {
  812.         return $this->shortcuts;
  813.     }
  814.     public function addShortcut(Shortcut $shortcut): self
  815.     {
  816.         if (!$this->shortcuts->contains($shortcut)) {
  817.             $this->shortcuts[] = $shortcut;
  818.             $shortcut->setUser($this);
  819.         }
  820.         return $this;
  821.     }
  822.     public function removeShortcut(Shortcut $shortcut): self
  823.     {
  824.         if ($this->shortcuts->removeElement($shortcut)) {
  825.             // set the owning side to null (unless already changed)
  826.             if ($shortcut->getUser() === $this) {
  827.                 $shortcut->setUser(null);
  828.             }
  829.         }
  830.         return $this;
  831.     }
  832.     public function getZone(): ?string
  833.     {
  834.         return $this->zone;
  835.     }
  836.     public function setZone(string $zone): self
  837.     {
  838.         $this->zone $zone;
  839.         return $this;
  840.     }
  841.     /**
  842.      * @return Collection|MediaBlockedByUser[]
  843.      */
  844.     public function getMediasBlockedByUser(): Collection
  845.     {
  846.         return $this->mediasBlockedByUser;
  847.     }
  848.     public function addMediasBlockedByUser(MediaBlockedByUser $mediasBlockedByUser): self
  849.     {
  850.         if (!$this->mediasBlockedByUser->contains($mediasBlockedByUser)) {
  851.             $this->mediasBlockedByUser[] = $mediasBlockedByUser;
  852.             $mediasBlockedByUser->setUser($this);
  853.         }
  854.         return $this;
  855.     }
  856.     public function removeMediasBlockedByUser(MediaBlockedByUser $mediasBlockedByUser): self
  857.     {
  858.         if ($this->mediasBlockedByUser->removeElement($mediasBlockedByUser)) {
  859.             // set the owning side to null (unless already changed)
  860.             if ($mediasBlockedByUser->getUser() === $this) {
  861.                 $mediasBlockedByUser->setUser(null);
  862.             }
  863.         }
  864.         return $this;
  865.     }
  866.     /**
  867.      * @return Collection|ProgramBlockedByUser[]
  868.      */
  869.     public function getProgramsBlockedByUser(): Collection
  870.     {
  871.         return $this->programsBlockedByUser;
  872.     }
  873.     public function addProgramsBlockedByUser(ProgramBlockedByUser $programsBlockedByUser): self
  874.     {
  875.         if (!$this->programsBlockedByUser->contains($programsBlockedByUser)) {
  876.             $this->programsBlockedByUser[] = $programsBlockedByUser;
  877.             $programsBlockedByUser->setUser($this);
  878.         }
  879.         return $this;
  880.     }
  881.     public function removeProgramsBlockedByUser(ProgramBlockedByUser $programsBlockedByUser): self
  882.     {
  883.         if ($this->programsBlockedByUser->removeElement($programsBlockedByUser)) {
  884.             // set the owning side to null (unless already changed)
  885.             if ($programsBlockedByUser->getUser() === $this) {
  886.                 $programsBlockedByUser->setUser(null);
  887.             }
  888.         }
  889.         return $this;
  890.     }
  891.     /**
  892.      * @return Collection|PostHiddenByUser[]
  893.      */
  894.     public function getPostsHiddenByUser(): Collection
  895.     {
  896.         return $this->postsHiddenByUser;
  897.     }
  898.     public function addPostsHiddenByUser(PostHiddenByUser $postsHiddenByUser): self
  899.     {
  900.         if (!$this->postsHiddenByUser->contains($postsHiddenByUser)) {
  901.             $this->postsHiddenByUser[] = $postsHiddenByUser;
  902.             $postsHiddenByUser->setUser($this);
  903.         }
  904.         return $this;
  905.     }
  906.     public function removePostsHiddenByUser(PostHiddenByUser $postsHiddenByUser): self
  907.     {
  908.         if ($this->postsHiddenByUser->removeElement($postsHiddenByUser)) {
  909.             // set the owning side to null (unless already changed)
  910.             if ($postsHiddenByUser->getUser() === $this) {
  911.                 $postsHiddenByUser->setUser(null);
  912.             }
  913.         }
  914.         return $this;
  915.     }
  916.     /**
  917.      * @return Collection|User[]
  918.      */
  919.     public function getUsersBlockedByUser(): Collection
  920.     {
  921.         return $this->usersBlockedByUser;
  922.     }
  923.     public function addUsersBlockedByUser(User $usersBlockedByUser): self
  924.     {
  925.         if (!$this->usersBlockedByUser->contains($usersBlockedByUser)) {
  926.             $this->usersBlockedByUser[] = $usersBlockedByUser;
  927.             $usersBlockedByUser->setUser($this);
  928.         }
  929.         return $this;
  930.     }
  931.     public function removeUsersBlockedByUser(User $usersBlockedByUser): self
  932.     {
  933.         if ($this->usersBlockedByUser->removeElement($usersBlockedByUser)) {
  934.             // set the owning side to null (unless already changed)
  935.             if ($usersBlockedByUser->getUser() === $this) {
  936.                 $usersBlockedByUser->setUser(null);
  937.             }
  938.         }
  939.         return $this;
  940.     }
  941.     public function getHideEmail(): ?bool
  942.     {
  943.         return $this->hideEmail;
  944.     }
  945.     public function setHideEmail(bool $hideEmail): self
  946.     {
  947.         $this->hideEmail $hideEmail;
  948.         return $this;
  949.     }
  950.     public function getWallet(): ?Wallet
  951.     {
  952.         return $this->wallet;
  953.     }
  954.     public function setWallet(?Wallet $wallet): self
  955.     {
  956.         // unset the owning side of the relation if necessary
  957.         if ($wallet === null && $this->wallet !== null) {
  958.             $this->wallet->setUser(null);
  959.         }
  960.         // set the owning side of the relation if necessary
  961.         if ($wallet !== null && $wallet->getUser() !== $this) {
  962.             $wallet->setUser($this);
  963.         }
  964.         $this->wallet $wallet;
  965.         return $this;
  966.     }
  967. }