src/Entity/Voiture.php line 17

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use Doctrine\Common\Collections\ArrayCollection;
  4. use Doctrine\Common\Collections\Collection;
  5. use Doctrine\ORM\Mapping as ORM;
  6. use Symfony\Component\HttpFoundation\File\File;
  7. use Vich\UploaderBundle\Mapping\Annotation as Vich;
  8. use Symfony\Bridge\Doctrine\Validator\Constraints\UniqueEntity;
  9. use Gedmo\Mapping\Annotation as Gedmo;
  10. /**
  11.  * @ORM\Entity(repositoryClass="App\Repository\VoitureRepository")
  12.  * @Vich\Uploadable
  13.  * @ORM\HasLifecycleCallbacks
  14.  */
  15. class Voiture
  16. {
  17.     const ESSENCE "Essence";
  18.     const DIESEL "Diesel";
  19.     const GAZ "Gaz";
  20.     const HYBRIDE "Hybride";
  21.     const ELECTRIQUE "Electrique";
  22.     const AUTOMATIQUE ="Automatique";
  23.     const MANUELLE ="Manuelle";
  24.     const SEMIAUTOMATIQUE ="Semi-automatique";
  25.     const BEIGE ="Beige";
  26.     const NOIR ="Noir";
  27.     const BLEU ="Bleu";
  28.     const MARRON ="Marron";
  29.     const GRIS ="Gris";
  30.     const VERT ="Vert";
  31.     const ORANGE ="Orange";
  32.     const ROUGE ="Rouge";
  33.     const ARGENTÉ ="Argenté";
  34.     const BLANC ="Blanc";
  35.     const AUTRES_COULEURS ="Autres couleurs";
  36.     const COMPACTE "Compacte";
  37.     const SUV4X4 "SUV/4x4";
  38.     const ROUTIERE "Routière";
  39.     const CABRIOLET "Cabriolet";
  40.     const FAMILIALE "Familiale";
  41.     const COUPE "Coupé";
  42.     const UTILITAIRES "Utilitaires";
  43.     const PICKUP "Pick-up";
  44.     const VUVI "VU/VI";
  45.     const BERLINE "Berline";
  46.     const BREAK = "Break";
  47.     const AUTRES "Autres";
  48.     const COULEUR = array(self::BEIGE=>1,self::NOIR =>2,self::BLEU =>3,self::MARRON =>4,self::GRIS =>5,self::VERT =>6,self::ORANGE =>7,self::ROUGE =>8,self::ARGENTÉ =>9,self::BLANC =>10,self::AUTRES_COULEURS =>11);
  49.     const COULEURFRONT = array(1=>self::BEIGE,2=>self::NOIR ,3=>self::BLEU,4=>self::MARRON,5=>self::GRIS,6=>self::VERT,7=>self::ORANGE,=>self::ROUGE,9=>self::ARGENTÉ,10=>self::BLANC,11=>self::AUTRES_COULEURS);
  50.     const  BOITE = array(self::AUTOMATIQUE=>1,self::SEMIAUTOMATIQUE =>2,self::MANUELLE =>3);
  51.     const  BOITEFRONT = array(1=>self::AUTOMATIQUE ,3=>self::MANUELLE,2=>self::SEMIAUTOMATIQUE);
  52.     const ENERGIE = array(self::ESSENCE=>1,self::DIESEL =>2,self::GAZ=>3,self::HYBRIDE=>4,self::ELECTRIQUE=>5);
  53.     const ENERGIEFRONT = array(1=>self::ESSENCE,2=>self::DIESEL,3=>self::GAZ,4=>self::HYBRIDE,5=>self::ELECTRIQUE);
  54.     const CATEGORIE = array(self::COMPACTE=>1,self::SUV4X4 =>2,self::ROUTIERE=>3,self::CABRIOLET=>4,self::FAMILIALE=>5,self::COUPE=>6,self::UTILITAIRES=>7,self::PICKUP=>8,self::VUVI=>9,self::AUTRES=>10,self::BERLINE=>11,self::BREAK=>12);
  55.     const CATEGORIEFRONT = array(1=>self::COMPACTE,2=>self::SUV4X4,3=>self::ROUTIERE,4=>self::CABRIOLET,5=>self::FAMILIALE,6=>self::COUPE,7=>self::UTILITAIRES,8=>self::PICKUP,9=>self::VUVI,10=>self::AUTRES,11=>self::BERLINE,12=>self::BREAK);
  56.     const SELLERIE =  array(self::TISSU=>1,self::CUIRE =>2);
  57.     const SELLERIEFRONT =  array(1=>self::TISSU,2=>self::CUIRE);
  58.     const TISSU 'Revêtement en tissu ';
  59.     const CUIRE 'Revêtement en cuire ';
  60.     const TYPEVOITURE =   array(self::VOITUREOCCASION=>1,self::VOITURENEUF =>2);
  61.     const TYPEVOITUREFRONT =   array(1=>self::VOITUREOCCASION,2=>self::VOITURENEUF);
  62.     const VOITUREOCCASION "Voiture d'occasion";
  63.     const VOITURENEUF =  "Voiture neuf";
  64.     public  static $translations = [
  65.         'fr' => [
  66.             self::ESSENCE => 'Essence',
  67.             self::DIESEL => 'Diesel',
  68.             self::GAZ => 'Gaz',
  69.             self::HYBRIDE => 'Hybride',
  70.             self::ELECTRIQUE => 'Électrique',
  71.             self::AUTOMATIQUE => 'Automatique',
  72.             self::MANUELLE => 'Manuelle',
  73.             self::SEMIAUTOMATIQUE => 'Semi-automatique',
  74.             self::BEIGE => 'Beige',
  75.             self::NOIR => 'Noir',
  76.             self::BLEU => 'Bleu',
  77.             self::MARRON => 'Marron',
  78.             self::GRIS => 'Gris',
  79.             self::VERT => 'Vert',
  80.             self::ORANGE => 'Orange',
  81.             self::ROUGE => 'Rouge',
  82.             self::ARGENTÉ => 'Argenté',
  83.             self::BLANC => 'Blanc',
  84.             self::AUTRES_COULEURS => 'Autres couleurs',
  85.             self::COMPACTE => 'Compacte',
  86.             self::SUV4X4 => 'SUV/4x4',
  87.             self::ROUTIERE => 'Routière',
  88.             self::CABRIOLET => 'Cabriolet',
  89.             self::FAMILIALE => 'Familiale',
  90.             self::COUPE => 'Coupé',
  91.             self::UTILITAIRES => 'Utilitaires',
  92.             self::PICKUP => 'Pick-up',
  93.             self::VUVI => 'VU/VI',
  94.             self::BERLINE => 'Berline',
  95.             self::BREAK => 'Break',
  96.             self::AUTRES => 'Autres',
  97.             self::TISSU => 'Revêtement en tissu',
  98.             self::CUIRE => 'Revêtement en cuire',
  99.             self::VOITUREOCCASION => 'Voiture d\'occasion',
  100.             self::VOITURENEUF => 'Voiture neuf',
  101.         ],
  102.         'en' => [
  103.             self::ESSENCE => 'Petrol',
  104.             self::DIESEL => 'Diesel',
  105.             self::GAZ => 'Gas',
  106.             self::HYBRIDE => 'Hybrid',
  107.             self::ELECTRIQUE => 'Electric',
  108.             self::AUTOMATIQUE => 'Automatic',
  109.             self::MANUELLE => 'Manual',
  110.             self::SEMIAUTOMATIQUE => 'Semi-automatic',
  111.             self::BEIGE => 'Beige',
  112.             self::NOIR => 'Black',
  113.             self::BLEU => 'Blue',
  114.             self::MARRON => 'Brown',
  115.             self::GRIS => 'Gray',
  116.             self::VERT => 'Green',
  117.             self::ORANGE => 'Orange',
  118.             self::ROUGE => 'Red',
  119.             self::ARGENTÉ => 'Silver',
  120.             self::BLANC => 'White',
  121.             self::AUTRES_COULEURS => 'Other colors',
  122.             self::COMPACTE => 'Compact',
  123.             self::SUV4X4 => 'SUV/4x4',
  124.             self::ROUTIERE => 'Sedan',
  125.             self::CABRIOLET => 'Convertible',
  126.             self::FAMILIALE => 'Family Car',
  127.             self::COUPE => 'Coupe',
  128.             self::UTILITAIRES => 'Utility Vehicle',
  129.             self::PICKUP => 'Pick-up',
  130.             self::VUVI => 'LCV/HGV',
  131.             self::BERLINE => 'Sedan',
  132.             self::BREAK => 'Station Wagon',
  133.             self::AUTRES => 'Others',
  134.             self::TISSU => 'Fabric covering',
  135.             self::CUIRE => 'Leather covering',
  136.             self::VOITUREOCCASION => 'Used car',
  137.             self::VOITURENEUF => 'New car',
  138.         ],
  139.     ];
  140.     public static function getTranslatedValue($constant$locale)
  141.     {
  142.         return self::$translations[$locale][$constant] ?? $constant;
  143.     }
  144.     public static function getTranslatedConstantArray($array$locale)
  145.     {
  146.         $translatedArray = [];
  147.         foreach ($array as $key => $value) {
  148.             $translatedArray[$key] = self::getTranslatedValue($value$locale);
  149.         }
  150.         return $translatedArray;
  151.     }
  152.     /**
  153.      * @ORM\Id()
  154.      * @ORM\GeneratedValue()
  155.      * @ORM\Column(type="integer")
  156.      */
  157.     private $id;
  158.     /**
  159.      * @var string
  160.      *
  161.      * @Gedmo\Slug(fields={"titre","sousTitre"})
  162.      * @ORM\Column(type="string", unique=true)
  163.      */
  164.     private $slug;
  165.     /**
  166.      * @ORM\Column(type="float")
  167.      */
  168.     private $prixUnitaire;
  169.     /**
  170.      * @ORM\Column(type="string", length=255)
  171.      */
  172.     private $titre;
  173.     /**
  174.      * @ORM\ManyToOne(targetEntity="App\Entity\Marque", inversedBy="voitures")
  175.      * @ORM\JoinColumn(nullable=false)
  176.      */
  177.     private $marque;
  178.     /**
  179.      * @ORM\ManyToOne(targetEntity="App\Entity\Professionel", inversedBy="voitures")
  180.      * @ORM\JoinColumn(nullable=false)
  181.      */
  182.     private $professionel;
  183.     /**
  184.      * @ORM\OneToMany(targetEntity="App\Entity\Vente", mappedBy="voiture", orphanRemoval=true)
  185.      */
  186.     private $ventes;
  187.     /**
  188.      * @ORM\Column(type="string", length=50, nullable=true)
  189.      */
  190.     private $annee;
  191.     /**
  192.      * @ORM\Column(type="integer")
  193.      */
  194.     private $energie;
  195.     /**
  196.      * @ORM\Column(type="integer")
  197.      */
  198.     private $reduction;
  199.     /**
  200.      * @ORM\Column(type="integer")
  201.      */
  202.     private $garantie;
  203.     /**
  204.      * @ORM\Column(type="integer" ,nullable=true)
  205.      */
  206.     private $livraison;
  207.     /**
  208.      * @ORM\Column(type="integer",nullable=true)
  209.      */
  210.     private $certifiee;
  211.     /**
  212.      * @ORM\Column(type="integer")
  213.      */
  214.     private $categorie;
  215.     /**
  216.      * @ORM\Column(type="string", length=255, nullable=true)
  217.      */
  218.     private $addresse;
  219.     /**
  220.      * @ORM\Column(type="string", length=250, nullable=true)
  221.      */
  222.     private $sousTitre;
  223.     /**
  224.      * @ORM\Column(type="integer")
  225.      */
  226.     private $klm;
  227.     /**
  228.      * @ORM\Column(type="integer")
  229.      */
  230.     private $boite;
  231.     /**
  232.      * @ORM\Column(type="integer")
  233.      */
  234.     private $nbrPorte;
  235.     /**
  236.      * @ORM\Column(type="string", length=50, nullable=true)
  237.      */
  238.     private $couleur;
  239.     /**
  240.      * @ORM\Column(type="text")
  241.      */
  242.     private $equipement;
  243.     /**
  244.      * @ORM\Column(type="string", length=50, nullable=true)
  245.      */
  246.     private $consommationMixe;
  247.     /**
  248.      * @ORM\Column(type="string", length=50, nullable=true)
  249.      */
  250.     private $consommationVille;
  251.     /**
  252.      * @ORM\Column(type="string", length=50, nullable=true)
  253.      */
  254.     private $consommationAutoroute;
  255.     /**
  256.      * @ORM\Column(type="string", length=50, nullable=true)
  257.      */
  258.     private $emissionsCo2Mixe;
  259.     /**
  260.      * @ORM\ManyToOne(targetEntity="App\Entity\CertificatEvironnemental", inversedBy="voitures")
  261.      * @ORM\JoinColumn(nullable=false)
  262.      */
  263.     private $certificatEvironnemental;
  264.     /**
  265.      * @ORM\OneToMany(targetEntity=Images::class, mappedBy="voiture", cascade={"persist", "remove"})
  266.      */
  267.     private Collection $images;
  268.     /**
  269.      * @ORM\Column(type="integer")
  270.      */
  271.     private $nbrPlace;
  272.     /**
  273.      * @ORM\Column(type="string", length=50, nullable=true)
  274.      */
  275.     private $puissanceDin;
  276.     /**
  277.      * @ORM\Column(type="string", length=50, nullable=true)
  278.      */
  279.     private $puissanceFiscale;
  280.     /**
  281.      * @ORM\Column(type="string", length=50, nullable=true)
  282.      */
  283.     private $interieur;
  284.     /**
  285.      * @ORM\Column(type="integer")
  286.      */
  287.     private $sellerie ;
  288.     /**
  289.      * @ORM\Column(type="integer")
  290.      */
  291.     private $typeVoiture ;
  292.     public function __construct()
  293.     {
  294.         $this->ventes = new ArrayCollection();
  295.         $this->images = new ArrayCollection();
  296.         $this->reduction 0;
  297.     }
  298.     public function getId(): ?int
  299.     {
  300.         return $this->id;
  301.     }
  302.     public function getPrixUnitaire(): ?float
  303.     {
  304.         return $this->prixUnitaire;
  305.     }
  306.     public function setPrixUnitaire(float $prixUnitaire): self
  307.     {
  308.         $this->prixUnitaire $prixUnitaire;
  309.         return $this;
  310.     }
  311.     public function getStock(): ?int
  312.     {
  313.         return $this->stock;
  314.     }
  315.     public function setStock(int $stock): self
  316.     {
  317.         $this->stock $stock;
  318.         return $this;
  319.     }
  320.     public function getMarque(): ?Marque
  321.     {
  322.         return $this->marque;
  323.     }
  324.     public function setMarque(?Marque $marque): self
  325.     {
  326.         $this->marque $marque;
  327.         return $this;
  328.     }
  329.     /**
  330.      * @return Collection|Vente[]
  331.      */
  332.     public function getVentes(): Collection
  333.     {
  334.         return $this->ventes;
  335.     }
  336.     public function addVente(Vente $vente): self
  337.     {
  338.         if (!$this->ventes->contains($vente)) {
  339.             $this->ventes[] = $vente;
  340.             $vente->setVoiture($this);
  341.         }
  342.         return $this;
  343.     }
  344.     public function removeVente(Vente $vente): self
  345.     {
  346.         if ($this->ventes->contains($vente)) {
  347.             $this->ventes->removeElement($vente);
  348.             // set the owning side to null (unless already changed)
  349.             if ($vente->getVoiture() === $this) {
  350.                 $vente->setVoiture(null);
  351.             }
  352.         }
  353.         return $this;
  354.     }
  355.     public function getType(): ?string
  356.     {
  357.         return $this->type;
  358.     }
  359.     public function setType(string $type): self
  360.     {
  361.         $this->type $type;
  362.         return $this;
  363.     }
  364.     public function __toString()
  365.     {
  366.         return $this->getTitre();
  367.     }
  368.     /**
  369.      * @return mixed
  370.      */
  371.     public function getAddresse()
  372.     {
  373.         return $this->addresse;
  374.     }
  375.     /**
  376.      * @param mixed $addresse
  377.      */
  378.     public function setAddresse($addresse): void
  379.     {
  380.         $this->addresse $addresse;
  381.     }
  382.     /**
  383.      * @return mixed
  384.      */
  385.     public function getGarantie()
  386.     {
  387.         return $this->garantie;
  388.     }
  389.     /**
  390.      * @param mixed $garantie
  391.      */
  392.     public function setGarantie($garantie): void
  393.     {
  394.         $this->garantie $garantie;
  395.     }
  396.     /**
  397.      * @return mixed
  398.      */
  399.     public function getEnergie()
  400.     {
  401.         return $this->energie;
  402.     }
  403.     /**
  404.      * @param mixed $energie
  405.      */
  406.     public function setEnergie($energie): void
  407.     {
  408.         $this->energie $energie;
  409.     }
  410.     /**
  411.      * @return mixed
  412.      */
  413.     public function getAnnee()
  414.     {
  415.         return $this->annee;
  416.     }
  417.     /**
  418.      * @param mixed $annee
  419.      */
  420.     public function setAnnee($annee): void
  421.     {
  422.         $this->annee $annee;
  423.     }
  424.     /**
  425.      * @return mixed
  426.      */
  427.     public function getCategorie()
  428.     {
  429.         return $this->categorie;
  430.     }
  431.     /**
  432.      * @param mixed $categorie
  433.      */
  434.     public function setCategorie($categorie): void
  435.     {
  436.         $this->categorie $categorie;
  437.     }
  438.     /**
  439.      * @return mixed
  440.      */
  441.     public function getKlm()
  442.     {
  443.         return $this->klm;
  444.     }
  445.     /**
  446.      * @param mixed $klm
  447.      */
  448.     public function setKlm($klm): void
  449.     {
  450.         $this->klm $klm;
  451.     }
  452.     /**
  453.      * @return mixed
  454.      */
  455.     public function getBoite()
  456.     {
  457.         return $this->boite;
  458.     }
  459.     /**
  460.      * @param mixed $boite
  461.      */
  462.     public function setBoite($boite): void
  463.     {
  464.         $this->boite $boite;
  465.     }
  466.     /**
  467.      * @return mixed
  468.      */
  469.     public function getNbrPorte()
  470.     {
  471.         return $this->nbrPorte;
  472.     }
  473.     /**
  474.      * @param mixed $nbrPorte
  475.      */
  476.     public function setNbrPorte($nbrPorte): void
  477.     {
  478.         $this->nbrPorte $nbrPorte;
  479.     }
  480.     /**
  481.      * @return mixed
  482.      */
  483.     public function getCouleur()
  484.     {
  485.         return $this->couleur;
  486.     }
  487.     /**
  488.      * @param mixed $couleur
  489.      */
  490.     public function setCouleur($couleur): void
  491.     {
  492.         $this->couleur $couleur;
  493.     }
  494.     /**
  495.      * @return mixed
  496.      */
  497.     public function getEquipement()
  498.     {
  499.         return $this->equipement;
  500.     }
  501.     /**
  502.      * @param mixed $equipement
  503.      */
  504.     public function setEquipement($equipement): void
  505.     {
  506.         $this->equipement $equipement;
  507.     }
  508.     public function addImage(Images $image): self
  509.     {
  510.         if (!$this->images->contains($image)) {
  511.             $this->images[] = $image;
  512.             $image->setVoiture($this);
  513.         }
  514.         return $this;
  515.     }
  516.     public function removeImage(Images $image): self
  517.     {
  518.         if ($this->images->contains($image)) {
  519.             $this->images->removeElement($image);
  520.             // set the owning side to null (unless already changed)
  521.             if ($image->getVoiture() === $this) {
  522.                 $image->setVoiture(null);
  523.             }
  524.         }
  525.         return $this;
  526.     }
  527.     /**
  528.      * @return Collection|Images[]
  529.      */
  530.     public function getImages(): Collection
  531.     {
  532.         return $this->images;
  533.     }
  534.     public function getNom(): ?string
  535.     {
  536.         return $this->nom;
  537.     }
  538.     public function setNom(string $nom): self
  539.     {
  540.         $this->nom $nom;
  541.         return $this;
  542.     }
  543.     public function getTitre(): ?string
  544.     {
  545.         return $this->titre;
  546.     }
  547.     public function setTitre(string $titre): self
  548.     {
  549.         $this->titre $titre;
  550.         return $this;
  551.     }
  552.     public function getLivraison(): ?bool
  553.     {
  554.         return $this->livraison;
  555.     }
  556.     public function setLivraison(int $livraison): self
  557.     {
  558.         $this->livraison $livraison;
  559.         return $this;
  560.     }
  561.     public function getCertifiee(): ?bool
  562.     {
  563.         return $this->certifiee;
  564.     }
  565.     public function setCertifiee(int $certifiee): self
  566.     {
  567.         $this->certifiee $certifiee;
  568.         return $this;
  569.     }
  570.     public function getSousTitre(): ?string
  571.     {
  572.         return $this->sousTitre;
  573.     }
  574.     public function setSousTitre(?string $sousTitre): self
  575.     {
  576.         $this->sousTitre $sousTitre;
  577.         return $this;
  578.     }
  579.     public function getReduction(): ?int
  580.     {
  581.         return $this->reduction;
  582.     }
  583.     public function setReduction(int $reduction): self
  584.     {
  585.         $this->reduction $reduction;
  586.         return $this;
  587.     }
  588.     public function getProfessionel(): ?Professionel
  589.     {
  590.         return $this->professionel;
  591.     }
  592.     public function setProfessionel(?Professionel $professionel): self
  593.     {
  594.         $this->professionel $professionel;
  595.         return $this;
  596.     }
  597.     public function getConsommationMixe(): ?string
  598.     {
  599.         return $this->consommationMixe;
  600.     }
  601.     public function setConsommationMixe(string $consommationMixe): self
  602.     {
  603.         $this->consommationMixe $consommationMixe;
  604.         return $this;
  605.     }
  606.     public function getConsommationVille(): ?string
  607.     {
  608.         return $this->consommationVille;
  609.     }
  610.     public function setConsommationVille(string $consommationVille): self
  611.     {
  612.         $this->consommationVille $consommationVille;
  613.         return $this;
  614.     }
  615.     public function getConsommationAutoroute(): ?string
  616.     {
  617.         return $this->consommationAutoroute;
  618.     }
  619.     public function setConsommationAutoroute(string $consommationAutoroute): self
  620.     {
  621.         $this->consommationAutoroute $consommationAutoroute;
  622.         return $this;
  623.     }
  624.     public function getEmissionsCo2Mixe(): ?string
  625.     {
  626.         return $this->emissionsCo2Mixe;
  627.     }
  628.     public function setEmissionsCo2Mixe(string $emissionsCo2Mixe): self
  629.     {
  630.         $this->emissionsCo2Mixe $emissionsCo2Mixe;
  631.         return $this;
  632.     }
  633.     public function getCertificatEvironnemental(): ?CertificatEvironnemental
  634.     {
  635.         return $this->certificatEvironnemental;
  636.     }
  637.     public function setCertificatEvironnemental(?CertificatEvironnemental $certificatEvironnemental): self
  638.     {
  639.         $this->certificatEvironnemental $certificatEvironnemental;
  640.         return $this;
  641.     }
  642.     public function getNbrPlace(): ?int
  643.     {
  644.         return $this->nbrPlace;
  645.     }
  646.     public function setNbrPlace(int $nbrPlace): self
  647.     {
  648.         $this->nbrPlace $nbrPlace;
  649.         return $this;
  650.     }
  651.     public function getPuissanceDin(): ?string
  652.     {
  653.         return $this->puissanceDin;
  654.     }
  655.     public function setPuissanceDin(?string $puissanceDin): self
  656.     {
  657.         $this->puissanceDin $puissanceDin;
  658.         return $this;
  659.     }
  660.     public function getPuissanceFiscale(): ?string
  661.     {
  662.         return $this->puissanceFiscale;
  663.     }
  664.     public function setPuissanceFiscale(?string $puissanceFiscale): self
  665.     {
  666.         $this->puissanceFiscale $puissanceFiscale;
  667.         return $this;
  668.     }
  669.     public function getInterieur(): ?string
  670.     {
  671.         return $this->interieur;
  672.     }
  673.     public function setInterieur(?string $interieur): self
  674.     {
  675.         $this->interieur $interieur;
  676.         return $this;
  677.     }
  678.     public function getSellerie(): ?int
  679.     {
  680.         return $this->sellerie;
  681.     }
  682.     public function setSellerie(int $sellerie): self
  683.     {
  684.         $this->sellerie $sellerie;
  685.         return $this;
  686.     }
  687.     public function getTypeVoiture(): ?int
  688.     {
  689.         return $this->typeVoiture;
  690.     }
  691.     public function setTypeVoiture(int $typeVoiture): self
  692.     {
  693.         $this->typeVoiture $typeVoiture;
  694.         return $this;
  695.     }
  696.     /**
  697.      * @return string
  698.      */
  699.     public function getSlug(): string
  700.     {
  701.         return $this->slug;
  702.     }
  703.     /**
  704.      * @param string $slug
  705.      */
  706.     public function setSlug(string $slug): void
  707.     {
  708.         $this->slug $slug;
  709.     }
  710. }