<?phpnamespace App\Entity;use App\Repository\MarqueClRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=MarqueClRepository::class) */class MarqueCl{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=50) */ private $marque_libele; /** * @ORM\Column(type="integer", nullable=true) */ private $ordre; /** * @ORM\OneToMany(targetEntity=ModeleCl::class, mappedBy="code_marque_cl_id") */ private $modeleCls; public function __construct() { $this->modeleCls = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getMarqueLibele(): ?string { return $this->marque_libele; } public function setMarqueLibele(string $marque_libele): self { $this->marque_libele = $marque_libele; return $this; } public function getOrdre(): ?int { return $this->ordre; } public function setOrdre(?int $ordre): self { $this->ordre = $ordre; return $this; } /** * @return Collection<int, ModeleCl> */ public function getModeleCls(): Collection { return $this->modeleCls; } public function addModeleCl(ModeleCl $modeleCl): self { if (!$this->modeleCls->contains($modeleCl)) { $this->modeleCls[] = $modeleCl; $modeleCl->setCodeMarqueClId($this); } return $this; } public function removeModeleCl(ModeleCl $modeleCl): self { if ($this->modeleCls->removeElement($modeleCl)) { // set the owning side to null (unless already changed) if ($modeleCl->getCodeMarqueClId() === $this) { $modeleCl->setCodeMarqueClId(null); } } return $this; }}