Linux SRV-16 6.18.44-paas #1 SMP PREEMPT_DYNAMIC Thu Aug 13 10:08:12 UTC 2026 x86_64
/
proc
/
self
/
root
/
proc
/
212
/
root
/
proc
/
212
/
task
/
212
/
root
/
proc
/
70528
/
task
/
70528
/
cwd
/
src
/
Entity
/
//proc/self/root/proc/212/root/proc/212/task/212/root/proc/70528/task/70528/cwd/src/Entity/Fold.php
<?php namespace App\Entity; use App\Repository\FoldRepository; use Doctrine\Common\Collections\ArrayCollection; use Doctrine\Common\Collections\Collection; use Doctrine\ORM\Mapping as ORM; /** * @ORM\Entity(repositoryClass=FoldRepository::class) */ class Fold { /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\ManyToOne(targetEntity=Product::class, inversedBy="folds") * @ORM\JoinColumn(nullable=false) */ private $product; /** * @ORM\Column(type="boolean") */ private $active; /** * @ORM\OneToMany(targetEntity=Price::class, mappedBy="fold") */ private $prices; public function __construct() { $this->active = true; $this->prices = 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, Price> */ public function getPrices(): Collection { return $this->prices; } public function addPrice(Price $price): self { if (!$this->prices->contains($price)) { $this->prices[] = $price; $price->setFold($this); } return $this; } public function removePrice(Price $price): self { if ($this->prices->removeElement($price)) { // set the owning side to null (unless already changed) if ($price->getFold() === $this) { $price->setFold(null); } } return $this; } }