public function updateNavigation($navigation) { $this->deserialize(); $key = -1; $temp = $this->array_find($this->jwtApp->Navigations, $navigation->_id, $key); if ($temp == null) { return "{$navigation->NavigationName} not exist."; } if (!JwtUtil::IsNullOrEmptyString($navigation->WidgetName) && $navigation->WidgetName != $temp['WidgetName']) { JwtUtil::rename($this->rootPath . "Scripts/Components/", $navigation->WidgetName, $temp['WidgetName']); } $this->updateRelatedNavigation($temp['WidgetName'], $navigation->WidgetName); $temp['NavigationName'] = $navigation->NavigationName; $temp['WidgetName'] = $navigation->WidgetName; $temp['ParamName'] = $navigation->ParamName; $temp['Views'] = $navigation->Views; $temp['HasLayout'] = $navigation->HasLayout; $this->jwtApp->Navigations[$key] = $temp; $this->serialize(); $this->generateConfig(); return "Successfully Updted."; }