Resources = 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 getValidationSchema(): ?array { return $this->validationSchema; } public function setValidationSchema(?array $validationSchema): self { $this->validationSchema = $validationSchema; return $this; } /** * @return Collection|Resource[] */ public function getResources(): Collection { return $this->Resources; } public function addResource(Resource $resource): self { if (!$this->Resources->contains($resource)) { $this->Resources[] = $resource; $resource->setType($this); } return $this; } public function removeResource(Resource $resource): self { if ($this->Resources->removeElement($resource)) { // set the owning side to null (unless already changed) if ($resource->getType() === $this) { $resource->setType(null); } } return $this; } }