/** * Returns a copy of this navigation item without its children * @return NavigationItem */ public function copyChildless() { $new = new NavigationItem($this->getName()); $new->setAction($this->getAction()); $new->setIcon($this->getIcon()); $new->setHeaderIcon($this->getHeaderIcon()); $new->setHeaderTitle($this->getHeaderTitle()); $new->setId($this->getId()); $new->setHasSettings($this->getHasSettings()); $new->setPosition($this->getPosition()); return $new; }