public AppController() : base() { userAppService = new UserAppService(); menuService = new UserMenuService(); logService = new UserLogService(); }
public SpaceLayoutController() { skinService = new SkinService(); userAppService = new UserAppService(); visitorService = new VisitorService(); menuService = new UserMenuService(); siteSkinService = new SiteSkinService(); }
public CmsInstallerBase() { installerService = new AppInstallerService(); appService = new UserAppService(); menuService = new UserMenuService(); sectionService = new ContentSectionService(); tplService = new ContentCustomTemplateService(); postService = new ContentPostService(); }
public UserHomeInstaller() { sectionService = new ContentSectionService(); appService = new UserAppService(); menuService = new UserMenuService(); appinfoService = new AppInstallerService(); lbl = lang.getByApp( typeof( ContentApp ) ); }
public WeiboRegisterController() { userService = new UserService(); confirmService = new UserConfirmService(); inviteService = new InviteService(); loginService = new LoginService(); friendService = new FriendService(); appService = new UserAppService(); menuService = new UserMenuService(); }
public RegisterController() { userService = new UserService(); confirmService = new UserConfirmService(); confirmEmail = new ConfirmEmail(); loginService = new LoginService(); appService = new UserAppService(); menuService = new UserMenuService(); inviteService = new InviteService(); HidePermission( typeof( SecurityController ) ); }
public List<IMenu> GetMenus( IMember owner ) { UserMenuService menuService = new UserMenuService(); return menuService.GetList( owner ); }
public MenuController() { menuService = new UserMenuService(); logService = new UserLogService(); }
private static void addUserAppAndMenus( User user, MvcContext ctx ) { if (strUtil.IsNullOrEmpty( config.Instance.Site.UserInitApp )) return; IMemberAppService appService = new UserAppService(); IMenuService menuService = new UserMenuService(); List<String> menus = new List<string>(); String[] arr = config.Instance.Site.UserInitApp.Split( ',' ); foreach (String app in arr) { if (strUtil.IsNullOrEmpty( app )) continue; menus.Add( app.Trim() ); } if (menus.Contains( "home" )) { new UserHomeInstaller().Install( ctx, user, wojilu.lang.get( "homepage" ), wojilu.Common.AppBase.AccessStatus.Public ); } if (menus.Contains( "blog" )) { IMemberApp blogApp = appService.Add( user, "博客", 2 ); // 添加菜单:此处需要明确传入MemberType,否则将会使用ctx.Owner,也就是Site的值,导致bug String blogUrl = UrlConverter.clearUrl( alink.ToUserAppFull( blogApp ), ctx, typeof( User ).FullName, user.Url ); menuService.AddMenuByApp( blogApp, blogApp.Name, "", blogUrl ); } if (menus.Contains( "photo" )) { IMemberApp photoApp = appService.Add( user, "相册", 3 ); String photoUrl = UrlConverter.clearUrl( alink.ToUserAppFull( photoApp ), ctx, typeof( User ).FullName, user.Url ); menuService.AddMenuByApp( photoApp, photoApp.Name, "", photoUrl ); } if (menus.Contains( "microblog" )) { IMenu menu = getMenu( user, "微博", alink.ToUserMicroblog( user ), ctx ); menuService.Insert( menu, user, user ); } //if (menus.Contains( "share" )) { // IMenu menu = getMenu( user, "转帖", lnkToUser( new Users.ShareController().Index ), ctx ); // menuService.Insert( menu, user, user ); //} if (menus.Contains( "friend" )) { IMenu menu = getMenu( user, "好友", lnkToUser( user, new Users.FriendController().FriendList ), ctx ); menuService.Insert( menu, user, user ); } if (menus.Contains( "visitor" )) { IMenu menu = getMenu( user, "访客", lnkToUser( user, new Users.VisitorController().Index ), ctx ); menuService.Insert( menu, user, user ); } if (menus.Contains( "forumpost" )) { IMenu menu = getMenu( user, "论坛帖子", lnkToUser( user, new Users.ForumController().Topic ), ctx ); menuService.Insert( menu, user, user ); } if (menus.Contains( "about" )) { IMenu menu = getMenu( user, "关于我", lnkToUser( user, new Users.ProfileController().Main ), ctx ); menuService.Insert( menu, user, user ); } if (menus.Contains( "feedback" )) { IMenu menu = getMenu( user, "留言", lnkToUser( user, new Users.FeedbackController().List ), ctx ); menuService.Insert( menu, user, user ); } }
public UserAppService() { menuService = new UserMenuService(); }