src/Entity/Sejour.php line 15

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 Doctrine\Common\Collections\ArrayCollection;
  6. /**
  7.  * Sejour
  8.  *
  9.  * @ORM\Table(name="sejour", indexes={@ORM\Index(name="fk_statu_ref_idx", columns={"statut"}), @ORM\Index(name="fk_userAcomp_idx", columns={"Id_acommp"}), @ORM\Index(name="fk_age_ref_idx", columns={"age_group"}), @ORM\Index(name="fk_userpartenaire_sejour_idx", columns={"id_partenaire"}), @ORM\Index(name="fk_ecole_sejour_idx", columns={"id_etablisment"})})
  10.  * @ORM\Entity(repositoryClass="App\Repository\SejourRepository")
  11.  */
  12. class Sejour
  13. {
  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="code_sejour", type="string", length=45, nullable=true)
  26.      */
  27.     private $codeSejour;
  28.     /**
  29.      * @var \DateTime|null
  30.      *
  31.      * @ORM\Column(name="date_creation_code", type="date", nullable=true)
  32.      */
  33.     private $dateCreationCode;
  34.     /**
  35.      * @var \DateTime|null
  36.      *
  37.      * @ORM\Column(name="date_fin_code", type="date", nullable=true)
  38.      */
  39.     private $dateFinCode;
  40.     /**
  41.      * @var string|null
  42.      *
  43.      * @ORM\Column(name="them_sejour", type="string", length=45, nullable=true)
  44.      */
  45.     private $themSejour;
  46.     /**
  47.      * @var string|null
  48.      *
  49.      * @ORM\Column(name="adresse_sejour", type="string", length=45, nullable=true)
  50.      */
  51.     private $adresseSejour;
  52.     /**
  53.      * @return null|string
  54.      */
  55.     public function getPays(): ?string
  56.     {
  57.         return $this->pays;
  58.     }
  59.     /**
  60.      * @param null|string $pays
  61.      */
  62.     public function setPays(?string $pays): void
  63.     {
  64.         $this->pays $pays;
  65.     }
  66.     /**
  67.      * @return null|string
  68.      */
  69.     public function getVille(): ?string
  70.     {
  71.         return $this->ville;
  72.     }
  73.     /**
  74.      * @param null|string $ville
  75.      */
  76.     public function setVille(?string $ville): void
  77.     {
  78.         $this->ville $ville;
  79.     }
  80.     /**
  81.      * @var string|null
  82.      *
  83.      * @ORM\Column(name="pays", type="string", length=255, nullable=true)
  84.      */
  85.     private $pays;
  86.     /**
  87.      * @var string|null
  88.      *
  89.      * @ORM\Column(name="ville", type="string", length=255, nullable=true)
  90.      */
  91.     private $ville;
  92.     /**
  93.      * @var int|null
  94.      *
  95.      * @ORM\Column(name="code_postal", type="integer", nullable=true)
  96.      */
  97.     private $codePostal;
  98.     /**
  99.      * @var \DateTime|null
  100.      *
  101.      * @ORM\Column(name="date_debut_sejour", type="date", nullable=true)
  102.      */
  103.     private $dateDebutSejour;
  104.     /**
  105.      * @var \DateTime|null
  106.      *
  107.      * @ORM\Column(name="date_fin_sejour", type="date", nullable=true)
  108.      */
  109.     private $dateFinSejour;
  110.     /**
  111.      * @var int|null
  112.      *
  113.      * @ORM\Column(name="nb_photo_diposer", type="integer", nullable=true)
  114.      */
  115.     private $nbPhotoDiposer;
  116.      /**
  117.      * @var int|null
  118.      *
  119.      * @ORM\Column(name="paym", type="integer", nullable=true)
  120.      */
  121.     private $paym;
  122.     /**
  123.      * @var int|null
  124.      *
  125.      * @ORM\Column(name="albumgratuie", type="integer", nullable=true)
  126.      */
  127.     private $albumgratuie;
  128.     /**
  129.      * @var int|null
  130.      *
  131.      * @ORM\Column(name="nb_message", type="integer", nullable=true)
  132.      */
  133.     private $nbMessage;
  134.     /**
  135.      * @var bool|null
  136.      *
  137.      * @ORM\Column(name="etat_acomp_Album", type="boolean", nullable=true)
  138.      */
  139.     private $etatAcompAlbum;
  140.     /**
  141.      * @var bool|null
  142.      *
  143.      * @ORM\Column(name="etat_adresse_carte", type="boolean", nullable=true)
  144.      */
  145.     private $etatAdresseCarte;
  146.     /**
  147.      * @var \Etablisment
  148.      *
  149.      * @ORM\ManyToOne(targetEntity="Etablisment")
  150.      * @ORM\JoinColumns({
  151.      *   @ORM\JoinColumn(name="id_etablisment", referencedColumnName="id")
  152.      * })
  153.      */
  154.     private $idEtablisment;
  155.     /**
  156.      * @var \User
  157.      *
  158.      * @ORM\ManyToOne(targetEntity="User")
  159.      * @ORM\JoinColumns({
  160.      *   @ORM\JoinColumn(name="Id_acommp", referencedColumnName="id")
  161.      * })
  162.      */
  163.     private $idAcommp;
  164.     /**
  165.      * @var \User
  166.      *
  167.      * @ORM\ManyToOne(targetEntity="User")
  168.      * @ORM\JoinColumns({
  169.      *   @ORM\JoinColumn(name="id_partenaire", referencedColumnName="id")
  170.      * })
  171.      */
  172.     private $idPartenaire;
  173.     /**
  174.      * @var \Ref
  175.      *
  176.      * @ORM\ManyToOne(targetEntity="Ref")
  177.      * @ORM\JoinColumns({
  178.      *   @ORM\JoinColumn(name="statut", referencedColumnName="id")
  179.      * })
  180.      */
  181.     private $statut;
  182.     /**
  183.      * @var int|null
  184.      *
  185.      * @ORM\Column(name="nbenfan", type="integer", nullable=true)
  186.      */
  187.     private $nbenfan;
  188.     /**
  189.      * @var int|null
  190.      *
  191.      * @ORM\Column(name="nbenfantencours", type="integer", nullable=true)
  192.      */
  193.     private $nbenfantencours;
  194.     /**
  195.      * @return int|null
  196.      */
  197.     public function getNbenfan(): ?int
  198.     {
  199.         return $this->nbenfan;
  200.     }
  201.     /**
  202.      * @param int|null $nbenfan
  203.      */
  204.     public function setNbenfan(?int $nbenfan): void
  205.     {
  206.         $this->nbenfan $nbenfan;
  207.     }
  208.     /**
  209.      * @var \Ref
  210.      *
  211.      * @ORM\ManyToOne(targetEntity="Ref")
  212.      * @ORM\JoinColumns({
  213.      *   @ORM\JoinColumn(name="age_group", referencedColumnName="id")
  214.      * })
  215.      */
  216.     private $ageGroup;
  217.     /**
  218.      * @ORM\OneToMany(targetEntity="App\Entity\Produit", mappedBy="idsjour")
  219.      */
  220.     private $produits;
  221.     /**
  222.      * @ORM\OneToMany(targetEntity="App\Entity\Commande", mappedBy="idSejour")
  223.      */
  224.     private $commandes;
  225.     /**
  226.      * @ORM\OneToMany(targetEntity="App\Entity\Cart", mappedBy="idsejour")
  227.      */
  228.     private $cartes;
  229.     /**
  230.      * @ORM\OneToMany(targetEntity="App\Entity\SejourAttachment", mappedBy="idSejour")
  231.      */
  232.     private $attachements;
  233.     /**
  234.      * @ORM\OneToMany(targetEntity="App\Entity\Jourdescripdate", mappedBy="idsejour")
  235.      */
  236.     private $jourdescripdate;
  237.     /**
  238.      * @ORM\Column(type="integer", nullable=true)
  239.      */
  240.     private $cd;
  241.     
  242.     /**
  243.      * @var float|null
  244.      *
  245.      * @ORM\Column(name="prixcnxparent", type="float", length=45, nullable=true)
  246.      */
  247.     private $prixcnxparent;
  248.      /**
  249.      * @var float|null
  250.      *
  251.      * @ORM\Column(name="prixcnxpartenaire", type="float", length=45, nullable=true)
  252.      */
  253.     private $prixcnxpartenaire;
  254.     /**
  255.      * @var float|null
  256.      *
  257.      * @ORM\Column(name="reversecnxpart", type="float", length=45, nullable=true)
  258.      */
  259.     private $reversecnxpart;
  260.      /**
  261.      * @var float|null
  262.      *
  263.      * @ORM\Column(name="reverseventepart", type="float", length=45, nullable=true)
  264.      */
  265.     private $reverseventepart;
  266.     /**
  267.      * @ORM\Column(type="string", length=255, nullable=true)
  268.      */
  269.     private $Referenc;
  270.     
  271.     /**
  272.      * @ORM\Column(type="integer", nullable=true)
  273.      */
  274.     private $cp;
  275.     /**
  276.      * @ORM\OneToMany(targetEntity="App\Entity\Panier", mappedBy="idSejour")
  277.      */
  278.     private $paniers;
  279.     /**
  280.      * @ORM\OneToMany(targetEntity="App\Entity\ParentSejour", mappedBy="idSejour")
  281.      */
  282.     private $parentSejour;
  283.     /**
  284.      * @ORM\OneToMany(targetEntity="App\Entity\PromoSejour", mappedBy="sejour")
  285.      */
  286.     private $promoSejours;
  287.     /**
  288.      * @ORM\OneToMany(targetEntity="App\Entity\Photonsumeriques", mappedBy="idSejour")
  289.      */
  290.     private $photonsumeriques;
  291.     public function __construct()
  292.     {
  293.         $this->attachements = new ArrayCollection();
  294.         $this->cartes = new ArrayCollection();
  295.         $this->produits = new ArrayCollection();
  296.         $this->commandes = new ArrayCollection();
  297.         $this->jourdescripdate = new ArrayCollection();
  298.         $this->paniers = new ArrayCollection();
  299.         $this->parentSejour = new ArrayCollection();
  300.         $this->promoSejours = new ArrayCollection();
  301.         $this->photonsumeriques = new ArrayCollection();
  302.     }
  303.     public function getId(): ?int
  304.     {
  305.         return $this->id;
  306.     }
  307.     public function getCodeSejour(): ?string
  308.     {
  309.         return $this->codeSejour;
  310.     }
  311.     public function setCodeSejour(?string $codeSejour): self
  312.     {
  313.         $this->codeSejour $codeSejour;
  314.         return $this;
  315.     }
  316.  
  317.     public function getDateCreationCode(): ?\DateTimeInterface
  318.     {
  319.         return $this->dateCreationCode;
  320.     }
  321.     public function setDateCreationCode(?\DateTimeInterface $dateCreationCode): self
  322.     {
  323.         $this->dateCreationCode $dateCreationCode;
  324.         return $this;
  325.     }
  326.     public function getDateFinCode(): ?\DateTimeInterface
  327.     {
  328.         return $this->dateFinCode;
  329.     }
  330.     public function setDateFinCode(?\DateTimeInterface $dateFinCode): self
  331.     {
  332.         $this->dateFinCode $dateFinCode;
  333.         return $this;
  334.     }
  335.     public function getThemSejour(): ?string
  336.     {
  337.         return $this->themSejour;
  338.     }
  339.     public function setThemSejour(?string $themSejour): self
  340.     {
  341.         $this->themSejour $themSejour;
  342.         return $this;
  343.     }
  344.     public function getAdresseSejour(): ?string
  345.     {
  346.         return $this->adresseSejour;
  347.     }
  348.     public function setAdresseSejour(?string $adresseSejour): self
  349.     {
  350.         $this->adresseSejour $adresseSejour;
  351.         return $this;
  352.     }
  353.     public function getCodePostal(): ?int
  354.     {
  355.         return $this->codePostal;
  356.     }
  357.     public function setCodePostal(?int $codePostal): self
  358.     {
  359.         $this->codePostal $codePostal;
  360.         return $this;
  361.     }
  362.     public function getDateDebutSejour(): ?\DateTimeInterface
  363.     {
  364.         return $this->dateDebutSejour;
  365.     }
  366.     public function setDateDebutSejour(?\DateTimeInterface $dateDebutSejour): self
  367.     {
  368.         $this->dateDebutSejour $dateDebutSejour;
  369.         return $this;
  370.     }
  371.     public function getDateFinSejour(): ?\DateTimeInterface
  372.     {
  373.         return $this->dateFinSejour;
  374.     }
  375.     public function setDateFinSejour(?\DateTimeInterface $dateFinSejour): self
  376.     {
  377.         $this->dateFinSejour $dateFinSejour;
  378.         return $this;
  379.     }
  380.     public function getNbPhotoDiposer(): ?int
  381.     {
  382.         return $this->nbPhotoDiposer;
  383.     }
  384.     public function setNbPhotoDiposer(?int $nbPhotoDiposer): self
  385.     {
  386.         $this->nbPhotoDiposer $nbPhotoDiposer;
  387.         return $this;
  388.     }
  389.     public function getNbMessage(): ?int
  390.     {
  391.         return $this->nbMessage;
  392.     }
  393.     public function setNbMessage(?int $nbMessage): self
  394.     {
  395.         $this->nbMessage $nbMessage;
  396.         return $this;
  397.     }
  398.     public function getEtatAcompAlbum(): ?bool
  399.     {
  400.         return $this->etatAcompAlbum;
  401.     }
  402.     public function setEtatAcompAlbum(?bool $etatAcompAlbum): self
  403.     {
  404.         $this->etatAcompAlbum $etatAcompAlbum;
  405.         return $this;
  406.     }
  407.     public function getEtatAdresseCarte(): ?bool
  408.     {
  409.         return $this->etatAdresseCarte;
  410.     }
  411.     public function setEtatAdresseCarte(?bool $etatAdresseCarte): self
  412.     {
  413.         $this->etatAdresseCarte $etatAdresseCarte;
  414.         return $this;
  415.     }
  416.     public function getIdEtablisment(): ?Etablisment
  417.     {
  418.         return $this->idEtablisment;
  419.     }
  420.     public function setIdEtablisment(?Etablisment $idEtablisment): self
  421.     {
  422.         $this->idEtablisment $idEtablisment;
  423.         return $this;
  424.     }
  425.     public function getIdAcommp(): ?User
  426.     {
  427.         return $this->idAcommp;
  428.     }
  429.     public function setIdAcommp(?User $idAcommp): self
  430.     {
  431.         $this->idAcommp $idAcommp;
  432.         return $this;
  433.     }
  434.     public function getIdPartenaire(): ?User
  435.     {
  436.         return $this->idPartenaire;
  437.     }
  438.     public function setIdPartenaire(?User $idPartenaire): self
  439.     {
  440.         $this->idPartenaire $idPartenaire;
  441.         return $this;
  442.     }
  443.     public function getStatut(): ?Ref
  444.     {
  445.         return $this->statut;
  446.     }
  447.     public function setStatut(?Ref $statut): self
  448.     {
  449.         $this->statut $statut;
  450.         return $this;
  451.     }
  452.     public function getAgeGroup(): ?Ref
  453.     {
  454.         return $this->ageGroup;
  455.     }
  456.     public function setAgeGroup(?Ref $ageGroup): self
  457.     {
  458.         $this->ageGroup $ageGroup;
  459.         return $this;
  460.     }
  461.     /**
  462.      * @return mixed
  463.      */
  464.     public function getProduits()
  465.     {
  466.         return $this->produits;
  467.     }
  468.     /**
  469.      * @param mixed $produits
  470.      */
  471.     public function setProduits($produits): void
  472.     {
  473.         $this->produits $produits;
  474.     }
  475.     public function getNbConnexion(): ?int
  476.     {
  477.         $cpt=0;
  478.        foreach ($this->produits as $pdt){
  479.            if ($pdt->getType()==null){
  480.                $cpt++;
  481.            }
  482.        }
  483.        return $cpt;
  484.     }
  485.     /**
  486.      * @return mixed
  487.      */
  488.     public function getCommandes()
  489.     {
  490.         return $this->commandes;
  491.     }
  492.     public function getMnttotale()
  493.     {
  494.         $cpt=0;
  495.         if($this->reversecnxpart != null){
  496.     
  497.     foreach ($this->commandes as $pdt){
  498.         
  499.             $cpt=$pdt->getMoantantTtcregl()+$cpt ;
  500.         
  501.     }
  502. }
  503.     return $cpt;
  504. }
  505.     /**
  506.      * @param mixed $commandes
  507.      */
  508.     public function setCommandes($commandes): void
  509.     {
  510.         $this->commandes $commandes;
  511.     }
  512.     public function getCommandesMontantTotal()
  513.     {
  514.         $SUM=0;
  515.         foreach ($this->commandes as $cmd){
  516.                 $SUM=$SUM+$cmd->getMontantht();
  517.         }
  518.         return $SUM;
  519.     }
  520.     public function getCommandesMontantTotalReversements(){
  521.         $SUM=0;
  522.         foreach ($this->commandes as $cmd){
  523.             foreach($cmd->getCommandesProduits() as $cmdPrd)
  524.             $SUM=$SUM+$cmdPrd->getReversement();
  525.         }
  526.         return $SUM;
  527.     }
  528.     /**
  529.      * @return mixed
  530.      */
  531.     public function getCartes()
  532.     {
  533.         return $this->cartes;
  534.     }
  535.     /**
  536.      * @param mixed $cartes
  537.      */
  538.     public function setCartes($cartes): void
  539.     {
  540.         $this->cartes $cartes;
  541.     }
  542.     /**
  543.      * @return mixed
  544.      */
  545.     public function getAttachements()
  546.     {
  547.         return $this->attachements;
  548.     }
  549.     /**
  550.      * @param mixed $attachements
  551.      */
  552.     public function setAttachements($attachements): void
  553.     {
  554.         $this->attachements $attachements;
  555.     }
  556.     public function getNbrAttachementsByType()
  557.     {
  558. $arrayFinal=['Photo'=>0,'Audio'=>0,"Video"=>0];
  559.         foreach($this->attachements as $attach){
  560.             //Photo
  561.             //6 7 30
  562.             if($attach->getIdAttchment()->getIdref()->getId()==6){
  563.                 $arrayFinal['Photo']=$arrayFinal['Photo']+1;
  564.             }
  565.             //message
  566.             elseif($attach->getIdAttchment()->getIdref()->getId()==7){
  567.                 $arrayFinal['Audio']=$arrayFinal['Audio']+1;
  568.             }
  569.             //Video
  570.             elseif($attach->getIdAttchment()->getIdref()->getId()==30){
  571.                 $arrayFinal['Video']=$arrayFinal['Video']+1;
  572.         }
  573.         }
  574.     }
  575.      /**
  576.      * @return mixed
  577.      */
  578.     public function getJourdescripdate()
  579.     {
  580.         return $this->jourdescripdate;
  581.     }
  582.     /**
  583.      * @param mixed $jourdescripdate
  584.      */
  585.     public function setJourdescripdate($jourdescripdate): void
  586.     {
  587.         $this->jourdescripdate $jourdescripdate;
  588.     }
  589.     public function getPaym(): ?int
  590.     {
  591.         return $this->paym;
  592.     }
  593.     public function setPaym(?int $paym): self
  594.     {
  595.         $this->paym $paym;
  596.         return $this;
  597.     }
  598.     
  599.     public function getAlbumgratuie(): ?int
  600.     {
  601.         return $this->albumgratuie;
  602.     }
  603.     public function setAlbumgratuie(?int $albumgratuie): self
  604.     {
  605.         $this->albumgratuie $albumgratuie;
  606.         return $this;
  607.     }
  608.     public function getCd(): ?int
  609.     {
  610.         return $this->cd;
  611.     }
  612.     public function setCd(?int $cd): self
  613.     {
  614.         $this->cd $cd;
  615.         return $this;
  616.     }
  617.     
  618.     public function getPrixcnxparent(): ?float
  619.     {
  620.         return $this->prixcnxparent;
  621.     }
  622.     public function setPrixcnxparent(?float $prixcnxparent): self
  623.     {
  624.         $this->prixcnxparent $prixcnxparent;
  625.         return $this;
  626.     }
  627.     public function getPrixcnxpartenaire(): ?float
  628.     {
  629.         return $this->prixcnxpartenaire;
  630.     }
  631.     public function setPrixcnxpartenaire(?float $prixcnxpartenaire): self
  632.     {
  633.         $this->prixcnxpartenaire $prixcnxpartenaire;
  634.         return $this;
  635.     }
  636.     public function getReversecnxpart(): ?float
  637.     {
  638.         return $this->reversecnxpart;
  639.     }
  640.     public function setReversecnxpart(?float $reversecnxpart): self
  641.     {
  642.         $this->reversecnxpart $reversecnxpart;
  643.         return $this;
  644.     }
  645.     public function getReverseventepart(): ?float
  646.     {
  647.         return $this->reverseventepart;
  648.     }
  649.     public function setReverseventepart(?float $reverseventepart): self
  650.     {
  651.         $this->reverseventepart $reverseventepart;
  652.         return $this;
  653.     }
  654.     public function getReferenc(): ?string
  655.     {
  656.         return $this->Referenc;
  657.     }
  658.     public function setReferenc(?string $Referenc): self
  659.     {
  660.         $this->Referenc $Referenc;
  661.         return $this;
  662.     }
  663.     
  664.     public function getCp(): ?int
  665.     {
  666.         return $this->cp;
  667.     }
  668.     public function setCp(?int $cp): self
  669.     {
  670.         $this->cp $cp;
  671.         return $this;
  672.     }
  673.     /**
  674.      * @return Collection|Panier[]
  675.      */
  676.     public function getPaniers(): Collection
  677.     {
  678.         return $this->paniers;
  679.     }
  680.     public function addPanier(Panier $panier): self
  681.     {
  682.         if (!$this->paniers->contains($panier)) {
  683.             $this->paniers[] = $panier;
  684.             $panier->setIdSejour($this);
  685.         }
  686.         return $this;
  687.     }
  688.     public function removePanier(Panier $panier): self
  689.     {
  690.         if ($this->paniers->contains($panier)) {
  691.             $this->paniers->removeElement($panier);
  692.             // set the owning side to null (unless already changed)
  693.             if ($panier->getIdSejour() === $this) {
  694.                 $panier->setIdSejour(null);
  695.             }
  696.         }
  697.         return $this;
  698.     }
  699.     /**
  700.      * @return mixed
  701.      */
  702.     public function getParentSejour()
  703.     {
  704.         return $this->parentSejour;
  705.     }
  706.     /**
  707.      * @param mixed $parentSejour
  708.      */
  709.     public function setParentSejour($parentSejour): void
  710.     {
  711.         $this->parentSejour $parentSejour;
  712.     }
  713.  public function getCountParentSejour()
  714.                                   {
  715.                                $count=0;
  716.                               
  717.                                       foreach($this->parentSejour as $cnc){
  718.                               #            $count=0;
  719.                                           if(substr($this->codeSejour11)=="P")
  720.                                           {
  721.                                               if ($cnc->getPayment()==1){
  722.                                                   $count=$count+1;
  723.                                               }
  724.                               
  725.                                           }else{
  726.                                               $count=$count+1;
  727.                                           }
  728.                                       }
  729.                                       return  $count;
  730.                                   }
  731.     /**
  732.      * @return int|null
  733.      */
  734.     public function getNbenfantencours(): ?int
  735.     {
  736.         return $this->nbenfantencours;
  737.     }
  738.     /**
  739.      * @param int|null $nbenfantencours
  740.      */
  741.     public function setNbenfantencours(?int $nbenfantencours): void
  742.     {
  743.         $this->nbenfantencours $nbenfantencours;
  744.     }
  745.     public function hasCommandesProduit(){
  746.         foreach ($this->commandes as $cmd){
  747.             foreach($cmd->getCommandesProduits() as $cmdPrd)
  748.                if($cmdPrd->getIdProduit()->getIdConditionnement()->getDescriptionCommande()!="Connexion"){
  749.                    return true;
  750.                }
  751.         }
  752.         return false;
  753.     }
  754.     /**
  755.      * @return Collection|PromoSejour[]
  756.      */
  757.     public function getPromoSejours(): Collection
  758.     {
  759.         return $this->promoSejours;
  760.     }
  761.     public function addPromoSejour(PromoSejour $promoSejour): self
  762.     {
  763.         if (!$this->promoSejours->contains($promoSejour)) {
  764.             $this->promoSejours[] = $promoSejour;
  765.             $promoSejour->setSejour($this);
  766.         }
  767.         return $this;
  768.     }
  769.     public function removePromoSejour(PromoSejour $promoSejour): self
  770.     {
  771.         if ($this->promoSejours->contains($promoSejour)) {
  772.             $this->promoSejours->removeElement($promoSejour);
  773.             // set the owning side to null (unless already changed)
  774.             if ($promoSejour->getSejour() === $this) {
  775.                 $promoSejour->setSejour(null);
  776.             }
  777.         }
  778.         return $this;
  779.     }
  780.     /**
  781.      * @return Collection|Photonsumeriques[]
  782.      */
  783.     public function getPhotonsumeriques(): Collection
  784.     {
  785.         return $this->photonsumeriques;
  786.     }
  787.     public function addPhotonsumerique(Photonsumeriques $photonsumerique): self
  788.     {
  789.         if (!$this->photonsumeriques->contains($photonsumerique)) {
  790.             $this->photonsumeriques[] = $photonsumerique;
  791.             $photonsumerique->setIdSejour($this);
  792.         }
  793.         return $this;
  794.     }
  795.     public function removePhotonsumerique(Photonsumeriques $photonsumerique): self
  796.     {
  797.         if ($this->photonsumeriques->contains($photonsumerique)) {
  798.             $this->photonsumeriques->removeElement($photonsumerique);
  799.             // set the owning side to null (unless already changed)
  800.             if ($photonsumerique->getIdSejour() === $this) {
  801.                 $photonsumerique->setIdSejour(null);
  802.             }
  803.         }
  804.         return $this;
  805.     }
  806. }