/** * @return Page instance with the specified information */ protected function createPage($manager, $parent, $name, $label, $title, $body) { $page = new Page(); $page->setPosition($parent, $name); $page->setLabel($label); $page->setTitle($title); $page->setBody($body); $manager->persist($page); return $page; }