public function remove($id) { if (isset($this->menu[$id])) { unset($this->menu[$id]); } elseif ($t = $this->getParent($id)) { $t->remove($id); } }