Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
srv
/
data
/
trash
/
vhost_www.traiteur-75.fr_1689065491
/
htdocs
/
src
/
Entity
/
/srv/data/trash/vhost_www.traiteur-75.fr_1689065491/htdocs/src/Entity/Configuration.php
<?php namespace App\Entity; use App\Repository\ConfigurationRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=ConfigurationRepository::class) */ class Configuration { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\Column(type="decimal", precision=6, scale=2) */ private $value; /** * @ORM\OneToMany(targetEntity=Product::class, mappedBy="vat") */ private $products; public function __construct() { $this->products = new ArrayCollection(); } public function __toString(){ return $this->name; } public function getId(): ?int { return $this->id; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function getValue(): ?string { return $this->value; } public function setValue(string $value): self { $this->value = $value; return $this; } /** * @return Collection<int, Product> */ public function getProducts(): Collection { return $this->products; } public function addProduct(Product $product): self { if (!$this->products->contains($product)) { $this->products[] = $product; $product->setVat($this); } return $this; } public function removeProduct(Product $product): self { if ($this->products->removeElement($product)) { // set the owning side to null (unless already changed) if ($product->getVat() === $this) { $product->setVat(null); } } return $this; } }