public function addChild(CategoryInterface $child) { $this->children[] = $child; $child->setParent($this); }