/** * @param Page $page * @return $this */ public function addChildPage(Page $page) { if (!$this->childPages->contains($page)) { $this->childPages->add($page); $page->setParentPage($this); } return $this; }
/** * @param Page $page * * @return Page */ public function addChild(Page $page) { $this->children->add($page); return $this; }