src/Entity/MarquePl.php line 13

Open in your IDE?
  1. <?php
  2. namespace App\Entity;
  3. use App\Repository\MarquePlRepository;
  4. use Doctrine\Common\Collections\ArrayCollection;
  5. use Doctrine\Common\Collections\Collection;
  6. use Doctrine\ORM\Mapping as ORM;
  7. /**
  8.  * @ORM\Entity(repositoryClass=MarquePlRepository::class)
  9.  */
  10. class MarquePl
  11. {
  12.     /**
  13.      * @ORM\Id
  14.      * @ORM\GeneratedValue
  15.      * @ORM\Column(type="integer")
  16.      */
  17.     private $id;
  18.     /**
  19.      * @ORM\Column(type="string", length=30)
  20.      */
  21.     private $marqueLibele;
  22.     /**
  23.      * @ORM\Column(type="string", length=255, nullable=true)
  24.      */
  25.     private $idOld;
  26.     /**
  27.      * @ORM\Column(type="integer", nullable=true)
  28.      */
  29.     private $ordre;
  30.     /**
  31.      * @ORM\OneToMany(targetEntity=ModelePl::class, mappedBy="codeMarquePl")
  32.      */
  33.     private $modelePls;
  34.     public function __construct()
  35.     {
  36.         $this->modelePls = new ArrayCollection();
  37.     }
  38.     public function getId(): ?int
  39.     {
  40.         return $this->id;
  41.     }
  42.     public function getMarqueLibele(): ?string
  43.     {
  44.         return $this->marqueLibele;
  45.     }
  46.     public function setMarqueLibele(string $marqueLibele): self
  47.     {
  48.         $this->marqueLibele $marqueLibele;
  49.         return $this;
  50.     }
  51.     public function getIdOld(): ?string
  52.     {
  53.         return $this->idOld;
  54.     }
  55.     public function setIdOld(?string $idOld): self
  56.     {
  57.         $this->idOld $idOld;
  58.         return $this;
  59.     }
  60.     public function getOrdre(): ?int
  61.     {
  62.         return $this->ordre;
  63.     }
  64.     public function setOrdre(?int $ordre): self
  65.     {
  66.         $this->ordre $ordre;
  67.         return $this;
  68.     }
  69.     /**
  70.      * @return Collection<int, ModelePl>
  71.      */
  72.     public function getModelePls(): Collection
  73.     {
  74.         return $this->modelePls;
  75.     }
  76.     public function addModelePl(ModelePl $modelePl): self
  77.     {
  78.         if (!$this->modelePls->contains($modelePl)) {
  79.             $this->modelePls[] = $modelePl;
  80.             $modelePl->setCodeMarquePl($this);
  81.         }
  82.         return $this;
  83.     }
  84.     public function removeModelePl(ModelePl $modelePl): self
  85.     {
  86.         if ($this->modelePls->removeElement($modelePl)) {
  87.             // set the owning side to null (unless already changed)
  88.             if ($modelePl->getCodeMarquePl() === $this) {
  89.                 $modelePl->setCodeMarquePl(null);
  90.             }
  91.         }
  92.         return $this;
  93.     }
  94. }