public ActionResult Create(MenuRecordModel model, bool continueEditing, FormCollection form) { if (!Services.Permissions.Authorize(StandardPermissionProvider.ManageMenus)) { return(AccessDeniedView()); } if (ModelState.IsValid) { var menu = MiniMapper.Map <MenuRecordModel, MenuRecord>(model); menu.WidgetZone = string.Join(",", model.WidgetZone ?? new string[0]).NullEmpty(); _menuStorage.InsertMenu(menu); SaveStoreMappings(menu, model); SaveAclMappings(menu, model); UpdateLocales(menu, model); Services.EventPublisher.Publish(new ModelBoundEvent(model, menu, form)); NotifySuccess(T("Admin.Common.DataSuccessfullySaved")); return(continueEditing ? RedirectToAction("Edit", new { id = menu.Id }) : RedirectToAction("List")); } PrepareModel(model, null); return(View(model)); }