<?phpnamespace App\Entity;use App\Repository\ElementSettingsRepository;use Doctrine\Common\Collections\ArrayCollection;use Doctrine\Common\Collections\Collection;use Doctrine\ORM\Mapping as ORM;/** * @ORM\Entity(repositoryClass=ElementSettingsRepository::class) */class ElementSettings{ /** * @ORM\Id * @ORM\GeneratedValue * @ORM\Column(type="integer") */ private $id; /** * @ORM\Column(type="json") */ private $defaultQuotationParameters = []; /** * @ORM\ManyToOne(targetEntity=FenceDictionary::class, inversedBy="elementSettings") * @ORM\JoinColumn(nullable=false) */ private $fenceDictionary; /** * @ORM\Column(type="string", length=255) */ private $name; /** * @ORM\Column(type="integer", options={"default": 0}) */ private $sortOrder; /** * @ORM\OneToMany(targetEntity=Standard::class, mappedBy="fence") */ private $standards; public function __construct() { $this->standards = new ArrayCollection(); } public function getId(): ?int { return $this->id; } public function getDefaultQuotationParameters(): ?array { return $this->defaultQuotationParameters; } public function setDefaultQuotationParameters(array $defaultQuotationParameters): self { $this->defaultQuotationParameters = $defaultQuotationParameters; return $this; } public function getFenceDictionary(): ?FenceDictionary { return $this->fenceDictionary; } public function setFenceDictionary(?FenceDictionary $fenceDictionary): self { $this->fenceDictionary = $fenceDictionary; return $this; } public function getName(): ?string { return $this->name; } public function setName(string $name): self { $this->name = $name; return $this; } public function __toString() { return $this->name; } public function getSortOrder(): ?int { return $this->sortOrder; } public function setSortOrder(int $sortOrder): self { $this->sortOrder = $sortOrder; return $this; } /** * @return Collection<int, Standard> */ public function getStandards(): Collection { return $this->standards; } public function addStandard(Standard $standard): self { if (!$this->standards->contains($standard)) { $this->standards[] = $standard; $standard->setFence($this); } return $this; } public function removeStandard(Standard $standard): self { if ($this->standards->removeElement($standard)) { // set the owning side to null (unless already changed) if ($standard->getFence() === $this) { $standard->setFence(null); } } return $this; }}