widgetFormInputs = 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; } /** * @return Collection|WidgetFormInput[] */ public function getWidgetFormInputs(): Collection { $expr = Criteria::expr(); $criteria = Criteria::create(); $criteria->orderBy(['sort' => Criteria::ASC]); return $this->widgetFormInputs->matching($criteria); } public function addWidgetFormInput(WidgetFormInput $widgetFormInput): self { if (!$this->widgetFormInputs->contains($widgetFormInput)) { $this->widgetFormInputs[] = $widgetFormInput; $widgetFormInput->setWidgetForm($this); } return $this; } public function removeWidgetFormInput(WidgetFormInput $widgetFormInput): self { if ($this->widgetFormInputs->removeElement($widgetFormInput)) { // set the owning side to null (unless already changed) if ($widgetFormInput->getWidgetForm() === $this) { $widgetFormInput->setWidgetForm(null); } } return $this; } }