childs = new ArrayCollection(); $this->menuchilds = new ArrayCollection(); } /** * @ORM\PrePersist */ public function onPrePersist() { $this->submitdate = new \DateTime('now'); } 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 getSubmitdate(): ?\DateTimeInterface { return $this->submitdate; } public function setSubmitdate(\DateTimeInterface $submitdate): self { $this->submitdate = $submitdate; return $this; } public function getExternalcode(): ?string { return $this->externalcode; } public function setExternalcode(?string $externalcode): self { $this->externalcode = $externalcode; return $this; } public function getExternalid(): ?string { return $this->externalid; } public function setExternalid(?string $externalid): self { $this->externalid = $externalid; return $this; } public function getBlogtype(): ?Blogtype { return $this->blogtype; } public function setBlogtype(?Blogtype $blogtype): self { $this->blogtype = $blogtype; return $this; } /** * @return Collection */ public function getChilds(): Collection { return $this->childs; } public function addChild(Child $child): self { if (!$this->childs->contains($child)) { $this->childs->add($child); $child->setBlog($this); } return $this; } public function removeChild(Child $child): self { if ($this->childs->removeElement($child)) { // set the owning side to null (unless already changed) if ($child->getBlog() === $this) { $child->setBlog(null); } } return $this; } /** * @return Collection */ public function getMenuchilds(): Collection { return $this->menuchilds; } public function addMenuchild(Menuchild $menuchild): self { if (!$this->menuchilds->contains($menuchild)) { $this->menuchilds->add($menuchild); $menuchild->setBlog($this); } return $this; } public function removeMenuchild(Menuchild $menuchild): self { if ($this->menuchilds->removeElement($menuchild)) { // set the owning side to null (unless already changed) if ($menuchild->getBlog() === $this) { $menuchild->setBlog(null); } } return $this; } }