/** * Removes a child from this menu item * * @param mixed $name The name of ioMenuItem instance to remove */ public function removeChild($name) { $item = $name instanceof ioMenuItem ? $name : $this->getChild($name); parent::removeChild($item); if ($item) { $item->setTree($this->getTree()->copy($item), true); } }