<?phpnamespace App\Entity;use App\Repository\MarquePlRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=MarquePlRepository::class) */class MarquePl{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=30) */ private $marqueLibele; /** * @ORM\Column(type="string", length=255, nullable=true) */ private $idOld; /** * @ORM\Column(type="integer", nullable=true) */ private $ordre; /** * @ORM\OneToMany(targetEntity=ModelePl::class, mappedBy="codeMarquePl") */ private $modelePls; public function __construct() { $this->modelePls = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getMarqueLibele(): ?string { return $this->marqueLibele; } public function setMarqueLibele(string $marqueLibele): self { $this->marqueLibele = $marqueLibele; return $this; } public function getIdOld(): ?string { return $this->idOld; } public function setIdOld(?string $idOld): self { $this->idOld = $idOld; return $this; } public function getOrdre(): ?int { return $this->ordre; } public function setOrdre(?int $ordre): self { $this->ordre = $ordre; return $this; } /** * @return Collection<int, ModelePl> */ public function getModelePls(): Collection { return $this->modelePls; } public function addModelePl(ModelePl $modelePl): self { if (!$this->modelePls->contains($modelePl)) { $this->modelePls[] = $modelePl; $modelePl->setCodeMarquePl($this); } return $this; } public function removeModelePl(ModelePl $modelePl): self { if ($this->modelePls->removeElement($modelePl)) { // set the owning side to null (unless already changed) if ($modelePl->getCodeMarquePl() === $this) { $modelePl->setCodeMarquePl(null); } } return $this; }}