Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
212
/
root
/
proc
/
212
/
root
/
proc
/
self
/
root
/
proc
/
self
/
root
/
proc
/
70528
/
cwd
/
src
/
Entity
/
//proc/212/root/proc/212/root/proc/self/root/proc/self/root/proc/70528/cwd/src/Entity/Support.php
<?php namespace App\Entity; use App\Repository\SupportRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=SupportRepository::class) */ class Support { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="supports") * @ORM\JoinColumn(nullable=false) */ private $product; /** * @ORM\Column(type="boolean") */ private $active; /** * @ORM\OneToMany(targetEntity=CartItem::class, mappedBy="support") */ private $cartItems; public function __construct() { $this->active = true; $this->cartItems = new ArrayCollection(); } 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 getProduct(): ?Product { return $this->product; } public function setProduct(?Product $product): self { $this->product = $product; return $this; } public function isActive(): ?bool { return $this->active; } public function setActive(bool $active): self { $this->active = $active; return $this; } /** * @return Collection<int, CartItem> */ public function getCartItems(): Collection { return $this->cartItems; } public function addCartItem(CartItem $cartItem): self { if (!$this->cartItems->contains($cartItem)) { $this->cartItems[] = $cartItem; $cartItem->setSupport($this); } return $this; } public function removeCartItem(CartItem $cartItem): self { if ($this->cartItems->removeElement($cartItem)) { // set the owning side to null (unless already changed) if ($cartItem->getSupport() === $this) { $cartItem->setSupport(null); } } return $this; } }