src/Entity/User.php line 16

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\Collection;
  4. use Doctrine\ORM\Mapping as ORM;
  5. use Symfony\Component\Security\Core\User\UserInterface;
  6. use Doctrine\Common\Collections\ArrayCollection;
  7. /**
  8.  * User
  9.  *
  10.  * @ORM\Table(name="user", indexes={@ORM\Index(name="fk_Userref_idx", columns={"statut"})})
  11.  * @ORM\Entity(repositoryClass="App\Repository\UserRepository")
  12.  */
  13. class User implements UserInterface {
  14.     /** Valeur showpubprod pour « désabonné des emails accompagnateur » (ne plus envoyer de mails à cet utilisateur). */
  15.     public const SHOWPUBPROD_DESABONNE_EMAIL 999;
  16.     /**
  17.      * @var int
  18.      *
  19.      * @ORM\Column(name="id", type="integer", nullable=false)
  20.      * @ORM\Id
  21.      * @ORM\GeneratedValue(strategy="IDENTITY")
  22.      */
  23.     private $id;
  24.     /**
  25.      * @var string|null
  26.      *
  27.      * @ORM\Column(name="nbconnx", type="string", length=45, nullable=true)
  28.      */
  29.     private $nbconnx;
  30.     /**
  31.      * @var string|null
  32.      *
  33.      * @ORM\Column(name="username", type="string", length=45, nullable=true)
  34.      */
  35.     private $username;
  36.     /**
  37.      * @var string|null
  38.      *
  39.      * @ORM\Column(name="adresse", type="string", length=45, nullable=true)
  40.      */
  41.     private $adresse;
  42.     /**
  43.      * @var string|null
  44.      *
  45.      * @ORM\Column(name="fonction", type="string", length=45, nullable=true)
  46.      */
  47.     private $fonction;
  48.     /**
  49.      * @var string|null
  50.      *
  51.      * @ORM\Column(name="etablisment", type="string", length=45, nullable=true)
  52.      */
  53.     private $etablisment;
  54.     /**
  55.      * @var string|null
  56.      *
  57.      * @ORM\Column(name="numMobile", type="string", nullable=true)
  58.      */
  59.     private $nummobile;
  60.     /**
  61.      * @var string|null
  62.      *
  63.      * @ORM\Column(name="logourl",type="text", nullable=true)
  64.      */
  65.     private $logourl;
  66.     /**
  67.      * @var \DateTime|null
  68.      *
  69.      * @ORM\Column(name="Datedepart", type="date", nullable=true)
  70.      */
  71.     private $datedepart;
  72.     /**
  73.      * @var \DateTime|null
  74.      *
  75.      * @ORM\Column(name="dateFlagDepot", type="date", nullable=true)
  76.      */
  77.     private $dateFlagDepot;
  78.     /**
  79.      * @var string|null
  80.      *
  81.      * @ORM\Column(name="flagDepot", type="string", length=45, nullable=true)
  82.      */
  83.     private $flagDepot;
  84.     /**
  85.      * @var string|null
  86.      *
  87.      * @ORM\Column(name="nom", type="string", length=45, nullable=true)
  88.      */
  89.     private $nom;
  90.     /**
  91.      * @var string|null
  92.      *
  93.      * @ORM\Column(name="prenom", type="string", length=45, nullable=true)
  94.      */
  95.     private $prenom;
  96.     /**
  97.      * @var string|null
  98.      *
  99.      * @ORM\Column(name="roles", type="text", length=255, nullable=true)
  100.      */
  101.     private $roles;
  102.     /**
  103.      * @var string|null
  104.      *
  105.      * @ORM\Column(name="email", type="string", length=45, nullable=true)
  106.      */
  107.     private $email;
  108.     /**
  109.      * @var string
  110.      *
  111.      * @ORM\Column(name="password", type="string", length=255, nullable=false)
  112.      */
  113.     private $password;
  114.     /**
  115.      * @var string|null
  116.      *
  117.      * @ORM\Column(name="salt", type="string", length=45, nullable=true)
  118.      */
  119.     private $salt;
  120.     /**
  121.      * @var \DateTime|null
  122.      *
  123.      * @ORM\Column(name="date_creation", type="datetime", nullable=true)
  124.      */
  125.     private $dateCreation;
  126.     /**
  127.      * @var string|null
  128.      *
  129.      * @ORM\Column(name="nometablisment", type="string", length=45, nullable=true)
  130.      */
  131.     private $nometablisment;
  132.     /**
  133.      * @var int|null
  134.      *
  135.      * @ORM\Column(name="randomnotice", type="integer", nullable=true)
  136.      */
  137.     private $randomnotice;
  138.     /**
  139.      * @var \Adress
  140.      *
  141.      * @ORM\ManyToOne(targetEntity="Adress")
  142.      * @ORM\JoinColumns({
  143.      *   @ORM\JoinColumn(name="adresslivraison", referencedColumnName="id" )
  144.      * })
  145.      */
  146.     private $adresslivraison;
  147.     /**
  148.      * @var \Adress
  149.      *
  150.      * @ORM\ManyToOne(targetEntity="Adress")
  151.      * @ORM\JoinColumns({
  152.      *   @ORM\JoinColumn(name="adressfactoration", referencedColumnName="id" )
  153.      * })
  154.      */
  155.     private $adressfactoration;
  156.     /**
  157.      * @var \Ref
  158.      *
  159.      * @ORM\ManyToOne(targetEntity="Ref")
  160.      * @ORM\JoinColumns({
  161.      *   @ORM\JoinColumn(name="statut", referencedColumnName="id")
  162.      * })
  163.      */
  164.     private $statut;
  165.     /**
  166.      * @ORM\OneToMany(targetEntity="App\Entity\Commande", mappedBy="idUser")
  167.      */
  168.     private $mescommandes;
  169.     /**
  170.      * @ORM\OneToMany(targetEntity="App\Entity\Etablisment", mappedBy="user")
  171.      */
  172.     private $etablismentuser;
  173.     /**
  174.      * @ORM\OneToMany(targetEntity="App\Entity\Blog", mappedBy="iduser")
  175.      */
  176.     private $mesblogs;
  177.     /**
  178.      * @ORM\OneToMany(targetEntity="App\Entity\Sejour", mappedBy="idAcommp")
  179.      */
  180.     private $mesSejourAcc;
  181.     /**
  182.      * @ORM\OneToMany(targetEntity="App\Entity\Sejour", mappedBy="idPartenaire")
  183.      */
  184.     private $mesSejourPart;
  185.     /**
  186.      * @var \User
  187.      *
  188.      * @ORM\ManyToOne(targetEntity="user")
  189.      * @ORM\JoinColumns({
  190.      *   @ORM\JoinColumn(name="usersecondaire", referencedColumnName="id")
  191.      * })
  192.      */
  193.     private $usersecondaire;
  194.     /**
  195.      * @var \Comptebancaire
  196.      *
  197.      * @ORM\ManyToOne(targetEntity="Comptebancaire")
  198.      * @ORM\JoinColumns({
  199.      *   @ORM\JoinColumn(name="comptebanque", referencedColumnName="id")
  200.      * })
  201.      */
  202.     private $comptebanque;
  203.     /**
  204.      * @var string|null
  205.      *
  206.      * @ORM\Column(name="infocomple", type="string", length=45, nullable=true)
  207.      */
  208.     private $infocomple;
  209.     /**
  210.      * @var string|null
  211.      *
  212.      * @ORM\Column(name="reponseemail", type="string", length=255, nullable=true)
  213.      */
  214.     private $reponseemail;
  215.     /**
  216.      * @ORM\Column(name="password_non_cripted",type="string", length=255, nullable=true)
  217.      */
  218.     private $passwordNonCripted;
  219.     /**
  220.      * @ORM\OneToMany(targetEntity="App\Entity\SejourAttachment", mappedBy="idParent")
  221.      */
  222.     private $sejourAttachments;
  223.     /**
  224.      * @ORM\Column(type="integer", nullable=true)
  225.      */
  226.     private $cnxparent;
  227.     /**
  228.      * @var string|null
  229.      *
  230.      * @ORM\Column(name="accompaplus", type="string", length=45, nullable=true)
  231.      */
  232.     private $accompaplus;
  233.     /**
  234.      * @ORM\Column(name="activatemail",type="integer", nullable=true)
  235.      */
  236.     private $activatemail;
  237.     /**
  238.      * @ORM\Column(name="Jeton",type="integer", nullable=true)
  239.      */
  240.     private $jeton;
  241.     /**
  242.      * @ORM\Column(name="showpubprod",type="integer", nullable=true)
  243.      */
  244.     private $showpubprod;
  245.      /**
  246.      * @var string|null
  247.      *
  248.      * @ORM\Column(name="showdetailsalbum", type="string", length=45, nullable=true)
  249.      */
  250.     private $showdetailsalbum;
  251.      /**
  252.      * @var string|null
  253.      *
  254.      * @ORM\Column(name="showdetailslivre", type="string", length=45, nullable=true)
  255.      */
  256.     private $showdetailslivre;
  257.      /**
  258.      * @var string|null
  259.      *
  260.      * @ORM\Column(name="showdetailsphotos", type="string", length=45, nullable=true)
  261.      */
  262.     private $showdetailsphotos;
  263.      /**
  264.      * @var string|null
  265.      *
  266.      * @ORM\Column(name="showdetailsretros", type="string", length=45, nullable=true)
  267.      */
  268.     private $showdetailsretros;
  269.      /**
  270.      * @var string|null
  271.      *
  272.      * @ORM\Column(name="showdetailscal", type="string", length=45, nullable=true)
  273.      */
  274.     private $showdetailscal;
  275.     
  276.     /**
  277.      * @return mixed
  278.      */
  279.     public function getJeton() {
  280.         return $this->jeton;
  281.     }
  282.     /**
  283.      * @param mixed $jeton
  284.      */
  285.     public function setJeton($jeton): void {
  286.         $this->jeton $jeton;
  287.     }
  288.     /**
  289.      * @ORM\Column(type="integer", nullable=true)
  290.      */
  291.     private $cnxpartenaire;
  292.     /**
  293.      * @ORM\OneToMany(targetEntity="App\Entity\Panier", mappedBy="creerPar")
  294.      */
  295.     private $paniers;
  296.     /**
  297.      * @var int|null
  298.      *
  299.      * @ORM\Column(name="smsnotif", type="integer", nullable=true)
  300.      */
  301.     private $smsnotif;
  302.     /**
  303.      * @var int|null
  304.      *
  305.      * @ORM\Column(name="mailnotif", type="integer", nullable=true)
  306.      */
  307.     private $mailnotif;
  308.     /**
  309.      * @var int|null
  310.      *
  311.      * @ORM\Column(name="AccoPlusToPartenaire", type="integer", nullable=true)
  312.      */
  313.     private $AccoPlusToPartenaire;
  314.     /**
  315.      * @ORM\OneToMany(targetEntity="App\Entity\Etiquette", mappedBy="support")
  316.      */
  317.     private $etiquettes;
  318.     /**
  319.      * @ORM\OneToMany(targetEntity="App\Entity\Etiquette", mappedBy="rapporteur")
  320.      */
  321.     private $etiquetteRapporteur;
  322.     /**
  323.      * @ORM\OneToMany(targetEntity="App\Entity\CommentaireEtiquette", mappedBy="createur")
  324.      */
  325.     private $commentaireEtiquettes;
  326.     /**
  327.      * @ORM\ManyToOne(targetEntity="App\Entity\Fonctions", inversedBy="users")
  328.      */
  329.     private $idFonction;
  330.     /**
  331.      * @ORM\Column(type="string", length=255, nullable=true)
  332.      */
  333.     private $jetonAccoPlusSejourGratuit;
  334.     /**
  335.      * @ORM\OneToMany(targetEntity="App\Entity\LogPromotions", mappedBy="idClient")
  336.      */
  337.     private $logPromotions;
  338.     /**
  339.      * @ORM\OneToMany(targetEntity="App\Entity\PromoParents", mappedBy="parent")
  340.      */
  341.     private $promoParents;
  342.     /**
  343.      * @ORM\OneToMany(targetEntity="App\Entity\Photonsumeriques", mappedBy="idUser")
  344.      */
  345.     private $photonsumeriques;
  346.     public function __construct() {
  347.         $this->mesSejourPart = new ArrayCollection();
  348.         $this->mesSejourAcc = new ArrayCollection();
  349.         $this->mescommandes = new ArrayCollection();
  350.         $this->mesblogs = new ArrayCollection();
  351.         $this->sejourAttachments = new ArrayCollection();
  352.         $this->paniers = new ArrayCollection();
  353.         $this->etablismentuser = new ArrayCollection();
  354.         $this->etiquettes = new ArrayCollection();
  355.         $this->etiquetteRapporteur = new ArrayCollection();
  356.         $this->commentaireEtiquettes = new ArrayCollection();
  357.         $this->logPromotions = new ArrayCollection();
  358.         $this->promoParents = new ArrayCollection();
  359.         $this->photonsumeriques = new ArrayCollection();
  360.     }
  361.     public function getRandomnotice() {
  362.         return $this->randomnotice;
  363.     }
  364.     public function setRandomnotice($randomnotice) {
  365.         $this->randomnotice $randomnotice;
  366.         return $this;
  367.     }
  368.     /**
  369.      * @return mixed
  370.      */
  371.     public function getEtablismentuser() {
  372.         return $this->etablismentuser;
  373.     }
  374.     /**
  375.      * @param mixed $mescommandes
  376.      */
  377.     public function setEtablismentuser($etablismentuser): void {
  378.         $this->etablismentuser $etablismentuser;
  379.     }
  380.     /**
  381.      * @return mixed
  382.      */
  383.     public function getMescommandes() {
  384.         return $this->mescommandes;
  385.     }
  386.     public function getMescommandesBySejour($Sejour) {
  387.         $cmds = array();
  388.         foreach ($this->mescommandes as $cmd) {
  389.             if ($cmd->idSejour == $Sejour) {
  390.                 array_push($cmds$cmd);
  391.             }
  392.         }
  393.         return $cmds;
  394.     }
  395.     /**
  396.      * @param mixed $mescommandes
  397.      */
  398.     public function setMescommandes($mescommandes): void {
  399.         $this->mescommandes $mescommandes;
  400.     }
  401.     public function getRoles(): array {
  402.         $roles $this->roles;
  403.         // guarantee every user at least has ROLE_USER
  404.         if ($roles != null)
  405.             $roles json_decode($roles);
  406.         else
  407.             $roles = array();
  408.         $roles[] = 'ROLE_USER';
  409.         return $roles;
  410.     }
  411.     /**
  412.      * @return null|string
  413.      */
  414.     public function getPassword(): ?string {
  415.         return $this->password;
  416.     }
  417.     /**
  418.      * @return null|string
  419.      */
  420.     public function getSalt(): ?string {
  421.         return $this->salt;
  422.     }
  423.     public function getUsername() {
  424.         return $this->username;
  425.     }
  426.     /**
  427.      * The public representation of the user (e.g. a username, an email address, etc.)
  428.      *
  429.      * @see UserInterface
  430.      */
  431.     public function getUserIdentifier(): string
  432.     {
  433.         return (string) $this->email;
  434.     }
  435.     public function eraseCredentials() {
  436.         // TODO: Implement eraseCredentials() method.
  437.     }
  438.     public function getId(): ?int {
  439.         return $this->id;
  440.     }
  441.     public function setRoles(string $roles): self {
  442.         $this->roles $roles;
  443.         return $this;
  444.     }
  445.     public function AddRole(?string $role): self {
  446.         $roles json_decode($this->roles);
  447.         $roles[] = $role;
  448.         $roles array_unique($roles);
  449.         $this->roles json_encode($roles);
  450.         return $this;
  451.     }
  452.     public function hasRole(?string $role) {
  453.         if ($this->roles != NULL) {
  454.             $roles json_decode($this->roles);
  455.             foreach ($roles as $rl) {
  456.                 if ($rl == $role) {
  457.                     return true;
  458.                 }
  459.             }
  460.         }
  461.         return false;
  462.     }
  463.     public function getNbconnx(): ?string {
  464.         return $this->nbconnx;
  465.     }
  466.     public function setNbconnx(?string $nbconnx): self {
  467.         $this->nbconnx $nbconnx;
  468.         return $this;
  469.     }
  470.     public function setUsername(?string $username): self {
  471.         $this->username $username;
  472.         return $this;
  473.     }
  474.     public function getAdresse(): ?string {
  475.         return $this->adresse;
  476.     }
  477.     public function setAdresse(?string $adresse): self {
  478.         $this->adresse $adresse;
  479.         return $this;
  480.     }
  481.     public function getFonction(): ?string {
  482.         return $this->fonction;
  483.     }
  484.     public function setFonction(?string $fonction): self {
  485.         $this->fonction $fonction;
  486.         return $this;
  487.     }
  488.     public function getEtablisment(): ?string {
  489.         return $this->etablisment;
  490.     }
  491.     public function setEtablisment(?string $etablisment): self {
  492.         $this->etablisment $etablisment;
  493.         return $this;
  494.     }
  495.     public function getNummobile(): ?string {
  496.         return $this->nummobile;
  497.     }
  498.     public function setNummobile(?string $nummobile): self {
  499.         $this->nummobile $nummobile;
  500.         return $this;
  501.     }
  502.     public function getLogourl(): ?string {
  503.         return $this->logourl;
  504.     }
  505.     public function setLogourl(?string $logourl): self {
  506.         $this->logourl $logourl;
  507.         return $this;
  508.     }
  509.     public function getDatedepart(): ?\DateTimeInterface {
  510.         return $this->datedepart;
  511.     }
  512.     public function setDatedepart(?\DateTimeInterface $datedepart): self {
  513.         $this->datedepart $datedepart;
  514.         return $this;
  515.     }
  516.     public function getNom(): ?string {
  517.         return $this->nom;
  518.     }
  519.     public function setNom(?string $nom): self {
  520.         $this->nom $nom;
  521.         return $this;
  522.     }
  523.     public function getPrenom(): ?string {
  524.         return $this->prenom;
  525.     }
  526.     public function setPrenom(?string $prenom): self {
  527.         $this->prenom $prenom;
  528.         return $this;
  529.     }
  530.     public function getEmail(): ?string {
  531.         return $this->email;
  532.     }
  533.     public function setEmail(?string $email): self {
  534.         $this->email $email;
  535.         return $this;
  536.     }
  537.     public function setPassword(string $password): self {
  538.         $this->password $password;
  539.         return $this;
  540.     }
  541.     public function setSalt(?string $salt): self {
  542.         $this->salt $salt;
  543.         return $this;
  544.     }
  545.     public function getDateCreation(): ?\DateTimeInterface {
  546.         return $this->dateCreation;
  547.     }
  548.     public function setDateCreation(?\DateTimeInterface $dateCreation): self {
  549.         $this->dateCreation $dateCreation;
  550.         return $this;
  551.     }
  552.     public function getStatut() {
  553.         return $this->statut;
  554.     }
  555.     public function setStatut(?Ref $statut): self {
  556.         $this->statut $statut;
  557.         return $this;
  558.     }
  559.     function getMesblogs() {
  560.         return $this->mesblogs;
  561.     }
  562.     function setMesblogs($mesblogs) {
  563.         $this->mesblogs $mesblogs;
  564.     }
  565.     public function __toString() {
  566.         return $this->roles;
  567.     }
  568.     /**
  569.      * @return mixed
  570.      */
  571.     public function getMesSejourAcc() {
  572.         return $this->mesSejourAcc;
  573.     }
  574.     /**
  575.      * @param mixed $mesSejourAcc
  576.      */
  577.     public function setMesSejourAcc($mesSejourAcc): void {
  578.         $this->mesSejourAcc $mesSejourAcc;
  579.     }
  580.     /**
  581.      * @return mixed
  582.      */
  583.     public function getMesSejourPart() {
  584.         return $this->mesSejourPart;
  585.     }
  586.     /**
  587.      * @param mixed $mesSejourPart
  588.      */
  589.     public function setMesSejourPart($mesSejourPart): void {
  590.         $this->mesSejourPart $mesSejourPart;
  591.     }
  592.     public function getNometablisment(): ?string {
  593.         return $this->nometablisment;
  594.     }
  595.     public function setNometablisment(?string $nometablisment): self {
  596.         $this->nometablisment $nometablisment;
  597.         return $this;
  598.     }
  599.     public function getAdresslivraison():?Adress {
  600.         return $this->adresslivraison;
  601.     }
  602.     public function setAdresslivraison(?Adress $adresslivraison): self {
  603.         $this->adresslivraison $adresslivraison;
  604.         return $this;
  605.     }
  606.     public function getAdressfactoration():?Adress {
  607.         return $this->adressfactoration;
  608.     }
  609.     public function setAdressfactoration(?Adress $adressfactoration): self {
  610.         $this->adressfactoration $adressfactoration;
  611.         return $this;
  612.     }
  613.     public function getUsersecondaire() {
  614.         return $this->usersecondaire;
  615.     }
  616.     public function setUsersecondaire(?User $usersecondaire): self {
  617.         $this->usersecondaire $usersecondaire;
  618.         return $this;
  619.     }
  620.     public function getComptebanque() {
  621.         return $this->comptebanque;
  622.     }
  623.     public function setComptebanque(?Comptebancaire $comptebanque): self {
  624.         $this->comptebanque $comptebanque;
  625.         return $this;
  626.     }
  627.     public function getInfocomple(): ?string {
  628.         return $this->infocomple;
  629.     }
  630.     public function setInfocomple(?string $infocomple): self {
  631.         $this->infocomple $infocomple;
  632.         return $this;
  633.     }
  634.     public function getReponseemail(): ?string {
  635.         return $this->reponseemail;
  636.     }
  637.     public function setReponseemail(?string $reponseemail): self {
  638.         $this->reponseemail $reponseemail;
  639.         return $this;
  640.     }
  641.     public function getPasswordNonCripted(): ?string {
  642.         return $this->passwordNonCripted;
  643.     }
  644.     public function setPasswordNonCripted(?string $passwordNonCripted): self {
  645.         $this->passwordNonCripted $passwordNonCripted;
  646.         return $this;
  647.     }
  648.     public function getCnxparent(): ?int {
  649.         return $this->cnxparent;
  650.     }
  651.     public function setCnxparent(?int $cnxparent): self {
  652.         $this->cnxparent $cnxparent;
  653.         return $this;
  654.     }
  655.     public function getActivatemail(): ?int {
  656.         return $this->activatemail;
  657.     }
  658.     public function setActivatemail(?int $activatemail): self {
  659.         $this->activatemail $activatemail;
  660.         return $this;
  661.     }
  662.     public function getCnxpartenaire(): ?int {
  663.         return $this->cnxpartenaire;
  664.     }
  665.     public function setCnxpartenaire(?int $cnxpartenaire): self {
  666.         $this->cnxpartenaire $cnxpartenaire;
  667.         return $this;
  668.     }
  669.     /**
  670.      * @return Collection|SejourAttachment[]
  671.      */
  672.     public function getSejourAttachments(): Collection {
  673.         return $this->sejourAttachments;
  674.     }
  675.     public function addSejourAttachment(SejourAttachment $sejourAttachment): self {
  676.         if (!$this->sejourAttachments->contains($sejourAttachment)) {
  677.             $this->sejourAttachments[] = $sejourAttachment;
  678.             $sejourAttachment->setIdParent($this);
  679.         }
  680.         return $this;
  681.     }
  682.     public function removeSejourAttachment(SejourAttachment $sejourAttachment): self {
  683.         if ($this->sejourAttachments->contains($sejourAttachment)) {
  684.             $this->sejourAttachments->removeElement($sejourAttachment);
  685.             // set the owning side to null (unless already changed)
  686.             if ($sejourAttachment->getIdParent() === $this) {
  687.                 $sejourAttachment->setIdParent(null);
  688.             }
  689.         }
  690.         return $this;
  691.     }
  692.     /**
  693.      * @return Collection|Panier[]
  694.      */
  695.     public function getPaniers(): Collection {
  696.         return $this->paniers;
  697.     }
  698.     public function addPanier(Panier $panier): self {
  699.         if (!$this->paniers->contains($panier)) {
  700.             $this->paniers[] = $panier;
  701.             $panier->setCreerPar($this);
  702.         }
  703.         return $this;
  704.     }
  705.     public function removePanier(Panier $panier): self {
  706.         if ($this->paniers->contains($panier)) {
  707.             $this->paniers->removeElement($panier);
  708.             // set the owning side to null (unless already changed)
  709.             if ($panier->getCreerPar() === $this) {
  710.                 $panier->setCreerPar(null);
  711.             }
  712.         }
  713.         return $this;
  714.     }
  715.     /**
  716.      * @return \DateTime|null
  717.      */
  718.     public function getDateFlagDepot(): ?\DateTime {
  719.         return $this->dateFlagDepot;
  720.     }
  721.     /**
  722.      * @param \DateTime|null $dateFlagDepot
  723.      */
  724.     public function setDateFlagDepot(?\DateTime $dateFlagDepot): void {
  725.         $this->dateFlagDepot $dateFlagDepot;
  726.     }
  727.     /**
  728.      * @return null|string
  729.      */
  730.     public function getFlagDepot(): ?string {
  731.         return $this->flagDepot;
  732.     }
  733.     /**
  734.      * @param null|string $flagDepot
  735.      */
  736.     public function setFlagDepot(?string $flagDepot): void {
  737.         $this->flagDepot $flagDepot;
  738.     }
  739.     /**
  740.      * @return null|string
  741.      */
  742.     public function getAccompaplus(): ?string {
  743.         return $this->accompaplus;
  744.     }
  745.     /**
  746.      * @param null|string $accompaplus
  747.      */
  748.     public function setAccompaplus(?string $accompaplus): void {
  749.         $this->accompaplus $accompaplus;
  750.     }
  751.     public function getSmsnotif(): ?int {
  752.         return $this->smsnotif;
  753.     }
  754.     public function setSmsnotif(?int $smsnotif): self {
  755.         $this->smsnotif $smsnotif;
  756.         return $this;
  757.     }
  758.     public function getMailnotif(): ?int {
  759.         return $this->mailnotif;
  760.     }
  761.     public function setMailnotif(?int $mailnotif): self {
  762.         $this->mailnotif $mailnotif;
  763.         return $this;
  764.     }
  765.     public function hasFreeAlbum() {
  766.         foreach ($this->mescommandes as $cmd) {
  767.             if (($cmd->getStatuts()->getId() == 33) || ($cmd->getStatuts()->getId() == 38)) {
  768.                 $recalculePrixCommande 0;
  769.                 foreach ($cmd->getCommandesProduits() as $produitCmd) {
  770.                     $recalculePrixCommande $recalculePrixCommande + ($produitCmd->getIdProduit()->getIdConditionnement()->getMontantTTC() * $produitCmd->getQuantiter());
  771.                 }
  772.                 if ($cmd->getMontanenv() != null) {
  773.                     $recalculePrixCommande $recalculePrixCommande $cmd->getMontanenv();
  774.                 }
  775.                 if ($recalculePrixCommande != $cmd->getMontantrth()) {
  776.                     return false;
  777.                 }
  778.             }
  779.         }
  780.         return true;
  781.     }
  782.     /**
  783.      * @return int|null
  784.      */
  785.     public function getAccoPlusToPartenaire(): ?int {
  786.         return $this->AccoPlusToPartenaire;
  787.     }
  788.     /**
  789.      * @param int|null $AccoPlusToPartenaire
  790.      */
  791.     public function setAccoPlusToPartenaire(?int $AccoPlusToPartenaire): void {
  792.         $this->AccoPlusToPartenaire $AccoPlusToPartenaire;
  793.     }
  794.     /**
  795.      * @return Collection|Etiquette[]
  796.      */
  797.     public function getEtiquettes(): Collection {
  798.         return $this->etiquettes;
  799.     }
  800.     public function addEtiquette(Etiquette $etiquette): self {
  801.         if (!$this->etiquettes->contains($etiquette)) {
  802.             $this->etiquettes[] = $etiquette;
  803.             $etiquette->setSupport($this);
  804.         }
  805.         return $this;
  806.     }
  807.     public function removeEtiquette(Etiquette $etiquette): self {
  808.         if ($this->etiquettes->contains($etiquette)) {
  809.             $this->etiquettes->removeElement($etiquette);
  810.             // set the owning side to null (unless already changed)
  811.             if ($etiquette->getSupport() === $this) {
  812.                 $etiquette->setSupport(null);
  813.             }
  814.         }
  815.         return $this;
  816.     }
  817.     /**
  818.      * @return Collection|Etiquette[]
  819.      */
  820.     public function getEtiquetteRapporteur(): Collection {
  821.         return $this->etiquetteRapporteur;
  822.     }
  823.     public function addEtiquetteRapporteur(Etiquette $etiquetteRapporteur): self {
  824.         if (!$this->etiquetteRapporteur->contains($etiquetteRapporteur)) {
  825.             $this->etiquetteRapporteur[] = $etiquetteRapporteur;
  826.             $etiquetteRapporteur->setRapporteur($this);
  827.         }
  828.         return $this;
  829.     }
  830.     public function removeEtiquetteRapporteur(Etiquette $etiquetteRapporteur): self {
  831.         if ($this->etiquetteRapporteur->contains($etiquetteRapporteur)) {
  832.             $this->etiquetteRapporteur->removeElement($etiquetteRapporteur);
  833.             // set the owning side to null (unless already changed)
  834.             if ($etiquetteRapporteur->getRapporteur() === $this) {
  835.                 $etiquetteRapporteur->setRapporteur(null);
  836.             }
  837.         }
  838.         return $this;
  839.     }
  840.     /**
  841.      * @return Collection|CommentaireEtiquette[]
  842.      */
  843.     public function getCommentaireEtiquettes(): Collection {
  844.         return $this->commentaireEtiquettes;
  845.     }
  846.     public function addCommentaireEtiquette(CommentaireEtiquette $commentaireEtiquette): self {
  847.         if (!$this->commentaireEtiquettes->contains($commentaireEtiquette)) {
  848.             $this->commentaireEtiquettes[] = $commentaireEtiquette;
  849.             $commentaireEtiquette->setCreateur($this);
  850.         }
  851.         return $this;
  852.     }
  853.     public function removeCommentaireEtiquette(CommentaireEtiquette $commentaireEtiquette): self {
  854.         if ($this->commentaireEtiquettes->contains($commentaireEtiquette)) {
  855.             $this->commentaireEtiquettes->removeElement($commentaireEtiquette);
  856.             // set the owning side to null (unless already changed)
  857.             if ($commentaireEtiquette->getCreateur() === $this) {
  858.                 $commentaireEtiquette->setCreateur(null);
  859.             }
  860.         }
  861.         return $this;
  862.     }
  863.     public function getShowpubprod() {
  864.         return $this->showpubprod;
  865.     }
  866.     public function setShowpubprod($showpubprod): void {
  867.         $this->showpubprod $showpubprod;
  868.     }
  869.     public function getShowdetailsalbum(): ?string {
  870.         return $this->showdetailsalbum;
  871.     }
  872.     public function getShowdetailslivre(): ?string {
  873.         return $this->showdetailslivre;
  874.     }
  875.     public function getShowdetailsphotos(): ?string {
  876.         return $this->showdetailsphotos;
  877.     }
  878.     public function getShowdetailsretros(): ?string {
  879.         return $this->showdetailsretros;
  880.     }
  881.     public function getShowdetailscal(): ?string {
  882.         return $this->showdetailscal;
  883.     }
  884.     public function setShowdetailsalbum(?string $showdetailsalbum): void {
  885.         $this->showdetailsalbum $showdetailsalbum;
  886.     }
  887.     public function setShowdetailslivre(?string $showdetailslivre): void {
  888.         $this->showdetailslivre $showdetailslivre;
  889.     }
  890.     public function setShowdetailsphotos(?string $showdetailsphotos): void {
  891.         $this->showdetailsphotos $showdetailsphotos;
  892.     }
  893.     public function setShowdetailsretros(?string $showdetailsretros): void {
  894.         $this->showdetailsretros $showdetailsretros;
  895.     }
  896.     public function setShowdetailscal(?string $showdetailscal): void {
  897.         $this->showdetailscal $showdetailscal;
  898.     }
  899.     public function getIdFonction(): ?Fonctions
  900.     {
  901.         return $this->idFonction;
  902.     }
  903.     public function setIdFonction(?Fonctions $idFonction): self
  904.     {
  905.         $this->idFonction $idFonction;
  906.         return $this;
  907.     }
  908.     public function getJetonAccoPlusSejourGratuit(): ?string
  909.     {
  910.         return $this->jetonAccoPlusSejourGratuit;
  911.     }
  912.     public function setJetonAccoPlusSejourGratuit(?string $jetonAccoPlusSejourGratuit): self
  913.     {
  914.         $this->jetonAccoPlusSejourGratuit $jetonAccoPlusSejourGratuit;
  915.         return $this;
  916.     }
  917.     /**
  918.      * @return Collection|LogPromotions[]
  919.      */
  920.     public function getLogPromotions(): Collection
  921.     {
  922.         return $this->logPromotions;
  923.     }
  924.     public function addLogPromotion(LogPromotions $logPromotion): self
  925.     {
  926.         if (!$this->logPromotions->contains($logPromotion)) {
  927.             $this->logPromotions[] = $logPromotion;
  928.             $logPromotion->setIdClient($this);
  929.         }
  930.         return $this;
  931.     }
  932.     public function removeLogPromotion(LogPromotions $logPromotion): self
  933.     {
  934.         if ($this->logPromotions->contains($logPromotion)) {
  935.             $this->logPromotions->removeElement($logPromotion);
  936.             // set the owning side to null (unless already changed)
  937.             if ($logPromotion->getIdClient() === $this) {
  938.                 $logPromotion->setIdClient(null);
  939.             }
  940.         }
  941.         return $this;
  942.     }
  943.     /**
  944.      * @return Collection|PromoParents[]
  945.      */
  946.     public function getPromoParents(): Collection
  947.     {
  948.         return $this->promoParents;
  949.     }
  950.     public function addPromoParent(PromoParents $promoParent): self
  951.     {
  952.         if (!$this->promoParents->contains($promoParent)) {
  953.             $this->promoParents[] = $promoParent;
  954.             $promoParent->setParent($this);
  955.         }
  956.         return $this;
  957.     }
  958.     public function removePromoParent(PromoParents $promoParent): self
  959.     {
  960.         if ($this->promoParents->contains($promoParent)) {
  961.             $this->promoParents->removeElement($promoParent);
  962.             // set the owning side to null (unless already changed)
  963.             if ($promoParent->getParent() === $this) {
  964.                 $promoParent->setParent(null);
  965.             }
  966.         }
  967.         return $this;
  968.     }
  969.     /**
  970.      * @return Collection|Photonsumeriques[]
  971.      */
  972.     public function getPhotonsumeriques(): Collection
  973.     {
  974.         return $this->photonsumeriques;
  975.     }
  976.     public function addPhotonsumerique(Photonsumeriques $photonsumerique): self
  977.     {
  978.         if (!$this->photonsumeriques->contains($photonsumerique)) {
  979.             $this->photonsumeriques[] = $photonsumerique;
  980.             $photonsumerique->setIdUser($this);
  981.         }
  982.         return $this;
  983.     }
  984.     public function removePhotonsumerique(Photonsumeriques $photonsumerique): self
  985.     {
  986.         if ($this->photonsumeriques->contains($photonsumerique)) {
  987.             $this->photonsumeriques->removeElement($photonsumerique);
  988.             if ($photonsumerique->getIdUser() === $this) {
  989.                 $photonsumerique->setIdUser(null);
  990.             }
  991.         }
  992.         return $this;
  993.     }
  994. }