openings = new ArrayCollection(); } public function getMerchant(): MerchantInterface { return $this->merchant; } public function setMerchant(MerchantInterface $merchant): self { $this->merchant = $merchant; return $this; } /** * @return Collection|OpeningInterface[] */ public function getOpenings(): Collection { return $this->openings; } public function addOpening(OpeningInterface $opening): self { if (!$this->openings->contains($opening)) { $this->openings[] = $opening; $opening->setGroupUser($this); } return $this; } public function removeOpening(OpeningInterface $opening): self { if ($this->openings->removeElement($opening)) { // set the owning side to null (unless already changed) if ($opening->getGroupUser() === $this) { $opening->setGroupUser(null); } } return $this; } }