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