// GET: Navbar public ActionResult Index() { var loader = ServiceLocator.Current.GetInstance <IContentLoader>(); IEnumerable <SitePage> pages = FilterForVisitor.Filter(loader.GetChildren <SitePage> (ContentReference.StartPage)).Cast <SitePage>() .Where(page => page.DisplayInMenu && !(page is RegisterLoginPage)); var startPage = _contentRepository.Get <HomePage>(ContentReference.StartPage); RegisterLoginPage registerPage = FilterForVisitor .Filter(loader.GetChildren <SitePage>(ContentReference.StartPage)) .Where(page => page is RegisterLoginPage).FirstOrDefault() as RegisterLoginPage; var image = _contentRepository.Get <ImageData>(startPage.HeaderBl.Image); var imageUrl = string.Empty; if (!ContentReference.IsNullOrEmpty(image.ContentLink)) { imageUrl = UrlResolver.Current.GetUrl(image); } var link = startPage.LinkURL; IPageRouteHelper pageRouteHelper = ServiceLocator.Current.GetInstance <IPageRouteHelper>(); var currentPage = pageRouteHelper.Content ?? pageRouteHelper.Page; var model = new NavbarViewModel { RegisterPage = registerPage, Children = pages, Image = imageUrl, Link = link, CurrentPage = currentPage as SitePage }; return(PartialView("_Navbar", model)); }
/// <summary> /// Constructor /// </summary> public GroupCreationBlockController(ICommunityRepository communityRepository, ICommunityMembershipModerationRepository moderationRepository, IPageRouteHelper pageRouteHelper) : base(pageRouteHelper) { _communityRepository = communityRepository; _moderationRepository = moderationRepository; }
public SheetMusicService( ImageMediaRepository imageMediaRepository, SheetMusicProductRepository sheetMusicProductRepository, SheetMusicVariantRepository sheetMusicVariantRepository, IPageRouteHelper pageRouteHelper) { if (imageMediaRepository == null) { throw new ArgumentNullException(nameof(imageMediaRepository)); } if (sheetMusicProductRepository == null) { throw new ArgumentNullException(nameof(sheetMusicProductRepository)); } if (sheetMusicVariantRepository == null) { throw new ArgumentNullException(nameof(sheetMusicVariantRepository)); } if (pageRouteHelper == null) { throw new ArgumentNullException(nameof(pageRouteHelper)); } this._imageMediaRepository = imageMediaRepository; this._sheetMusicProductRepository = sheetMusicProductRepository; this._sheetMusicVariantRepository = sheetMusicVariantRepository; this._pageRouteHelper = pageRouteHelper; }
public MovieController(IMovieRepository movieRepository, IDataStoreRepository dataStoreRepository, IContentLoader contentLoader, IPageRouteHelper pageRouteHelper) { _movieRepository = movieRepository; _dataStoreRepository = dataStoreRepository; _contentLoader = contentLoader; _pageRouteHelper = pageRouteHelper; }
public ContextResolver(IContentRepository repository, IPageRouteHelper pageRouteHelper) { Guard.ValidateObject(repository); Guard.ValidateObject(pageRouteHelper); _repository = repository; _pageRouteHelper = pageRouteHelper; }
/// <summary> /// Initializes a new instance of the <see cref="ContentContextProvider" /> class. /// </summary> /// <param name="pageRouteHelper">The page route helper.</param> /// <param name="urlResolver">The URL resolver.</param> /// <param name="enterpriseSettings">The enterprise settings.</param> public ContentContextProvider(IPageRouteHelper pageRouteHelper, UrlResolver urlResolver, IEnterpriseSettings enterpriseSettings) { _pageRouteHelper = pageRouteHelper; _urlResolver = urlResolver; _enterpriseSettings = enterpriseSettings; _currentContext = new Lazy <IContext>(GetContextInternal); }
protected PageViewModelBase() { _pageRouteHelper = ServiceLocator.Current.GetInstance <IPageRouteHelper>(); Layout = new LayoutViewModel(); var currentPage = (CurrentPage as PageBase); Layout.PageTitle = currentPage == null ? "Epi Bootstrapper" : currentPage.Header + " - Epi Bootstrapper"; }
/// <summary> /// Constructor /// </summary> public MembershipDisplayBlockController(ICommunityRepository communityRepository, ICommunityMemberRepository memberRepository, IUserRepository userRepository, IPageRouteHelper pageRouteHelper) : base(pageRouteHelper) { _communityRepository = communityRepository; _memberRepository = memberRepository; _userRepository = userRepository; }
/// <summary> /// Constructor /// </summary> public MembershipAffiliationBlockController(IUserRepository userRepository, ICommunityRepository communityRepository, ICommunityMemberRepository communityMemberRepository, IPageRouteHelper pageRouteHelper) : base(pageRouteHelper) { _userRepository = userRepository; _communityRepository = communityRepository; _memberRepository = communityMemberRepository; }
/// <summary> /// Constructor /// </summary> public LikeButtonBlockController(IRatingService ratingService, IRatingStatisticsService ratingStatisticsService, IPageRouteHelper pageRouteHelper) { _ratingStatisticsService = ratingStatisticsService; // This is all wired up by the installation of the EPiServer.Social.Ratings.Site package _ratingService = ratingService; // This is wired up by Episerver Core/Framework _pageRouteHelper = pageRouteHelper; }
/// <summary> /// Constructor /// </summary> public SubscriptionBlockController(IUserRepository userRepository, IPageSubscriptionRepository pageSubscriptionRepository, IPageRepository pageRepository, IPageRouteHelper pageRouteHelper) : base(pageRouteHelper) { _userRepository = userRepository; _subscriptionRepository = pageSubscriptionRepository; _pageRepository = pageRepository; }
/// <summary> /// Constructor /// </summary> public LikeButtonBlockController() { // This is all wired up by the installation of the EPiServer.Social.Ratings.Site package this.ratingService = ServiceLocator.Current.GetInstance <IRatingService>(); this.ratingStatisticsService = ServiceLocator.Current.GetInstance <IRatingStatisticsService>(); // This is wired up by Episerver Core/Framework this.contentRepository = ServiceLocator.Current.GetInstance <IContentRepository>(); this.pageRouteHelper = ServiceLocator.Current.GetInstance <IPageRouteHelper>(); }
public ContentRecommendationsBlockController( IPageRouteHelper pageRouteHelper, ICmsTrackingService recommendationService, IUrlResolver urlResolver, IContentTypeRepository contentTypeRepository) { _pageRouteHelper = pageRouteHelper; _recommendationService = recommendationService; _urlResolver = urlResolver; _contentTypeRepository = contentTypeRepository; }
/// <summary> /// Constructor for admission block /// </summary> public GroupAdmissionBlockController(IUserRepository userRepository, ICommunityRepository communityRepository, ICommunityMemberRepository memberRepository, ICommunityMembershipModerationRepository moderationRepository, IPageRouteHelper pageRouteHelper) : base(pageRouteHelper) { _userRepository = userRepository; _communityRepository = communityRepository; _memberRepository = memberRepository; _moderationRepository = moderationRepository; }
/// <summary> /// Constructor /// </summary> public CommentsBlockController(IUserRepository userRepository, IPageCommentRepository pageCommentRepository, IPageRepository pageRepository, ICommunityActivityRepository communityActivityRepository, IPageRouteHelper pageRouteHelper) : base(pageRouteHelper) { _userRepository = userRepository; _commentRepository = pageCommentRepository; _pageRepository = pageRepository; _activityRepository = communityActivityRepository; }
public BlogListPageController(IContentLoader contentLoader, UrlResolver urlResolver, ICmsTrackingService trackingService, BlogTagFactory blogTagFactory, IPageRouteHelper pageRouteHelper) { _contentLoader = contentLoader; _urlResolver = urlResolver; _trackingService = trackingService; _blogTagFactory = blogTagFactory; _pageRouteHelper = pageRouteHelper; }
public MyAccountNavigationController( IContentLoader contentLoader, LocalizationService localizationService, IPageRouteHelper pageRouteHelper, UrlResolver urlResolver, ISettingsService settingsService) { _contentLoader = contentLoader; _localizationService = localizationService; _pageRouteHelper = pageRouteHelper; _urlResolver = urlResolver; _settingsService = settingsService; }
public RecentPageCategoryRecommendationController(CategoryRepository categoryRepository, IClient findClient, IContentLoader contentLoader, ICmsSearchService cmsSearchService, IContentTypeRepository <PageType> contentTypeRepository, IPageRouteHelper pageRouteHelper) { _categoryRepository = categoryRepository; _findClient = findClient; _contentLoader = contentLoader; _cmsSearchService = cmsSearchService; _contentTypeRepository = contentTypeRepository; _pageRouteHelper = pageRouteHelper; }
public MyAccountNavigationController( IContentLoader contentLoader, LocalizationService localizationService, IOrganizationService organizationService, ICustomerService customerService, IPageRouteHelper pageRouteHelper, UrlResolver urlResolver) { _contentLoader = contentLoader; _localizationService = localizationService; _organizationService = organizationService; _customerService = customerService; _pageRouteHelper = pageRouteHelper; _urlResolver = urlResolver; }
public AddressBookController( IContentLoader contentLoader, IAddressBookService addressBookService, LocalizationService localizationService, ICustomerService customerService, ISettingsService settingsService, IPageRouteHelper pageRouteHelper) { _contentLoader = contentLoader; _addressBookService = addressBookService; _localizationService = localizationService; _customerService = customerService; _settingsService = settingsService; _pageRouteHelper = pageRouteHelper; }
/// <summary> /// Constructor /// </summary> public RatingBlockController( IUserRepository userRepository, IPageRatingRepository ratingRepository, IPageRepository pageRepository, ICommunityActivityRepository activityRepository, ICommunityRepository communityRepository, ICommunityMemberRepository memberRepository, IPageRouteHelper pageRouteHelper) : base(pageRouteHelper) { _userRepository = userRepository; _ratingRepository = ratingRepository; _pageRepository = pageRepository; _activityRepository = activityRepository; _communityRepository = communityRepository; _memberRepository = memberRepository; }
public PagesNavigationTreeBuilder( IProjectService projectService, IPageService pageService, INodeUrlPrefixProvider prefixProvider, IUrlHelperFactory urlHelperFactory, IPageRouteHelper pageRouteHelper, IActionContextAccessor actionContextAccesor ) { this.projectService = projectService; this.pageService = pageService; this.prefixProvider = prefixProvider; this.urlHelperFactory = urlHelperFactory; this.actionContextAccesor = actionContextAccesor; this.pageRouteHelper = pageRouteHelper; }
public PagesNavigationTreeBuilder( IProjectService projectService, IPageService pageService, INodeUrlPrefixProvider prefixProvider, IUrlHelperFactory urlHelperFactory, IPageRouteHelper pageRouteHelper, IBlogRoutes blogRoutes, IActionContextAccessor actionContextAccesor ) { _projectService = projectService; _pageService = pageService; _prefixProvider = prefixProvider; _urlHelperFactory = urlHelperFactory; _actionContextAccesor = actionContextAccesor; _pageRouteHelper = pageRouteHelper; _blogRoutes = blogRoutes; }
public SiteFooterService(UrlResolver urlResolver, AppModeService appModeService, IPageRouteHelper pageRouteHelper) { if (urlResolver == null) { throw new ArgumentNullException(nameof(urlResolver)); } if (appModeService == null) { throw new ArgumentNullException(nameof(appModeService)); } if (pageRouteHelper == null) { throw new ArgumentNullException(nameof(pageRouteHelper)); } this._urlResolver = urlResolver; this._appModeService = appModeService; this._pageRouteHelper = pageRouteHelper; }
public MyAccountNavigationComponent( IContentLoader contentLoader, LocalizationService localizationService, IOrganizationService organizationService, ICustomerService customerService, IPageRouteHelper pageRouteHelper, UrlResolver urlResolver, ISettingsService settingsService, ICookieService cookieService) { _contentLoader = contentLoader; _localizationService = localizationService; _organizationService = organizationService; _customerService = customerService; _pageRouteHelper = pageRouteHelper; _urlResolver = urlResolver; _settingsService = settingsService; _cookieService = cookieService; }
public CheckoutController(IPageRouteHelper pageRouteHelper, IOrderRepository orderRepository, CheckoutViewModelFactory checkoutViewModelFactory, ICartService cartService, OrderSummaryViewModelFactory orderSummaryViewModelFactory, ICommerceTrackingService recommendationService, CheckoutService checkoutService, UrlHelper urlHelper, ApplicationSignInManager <SiteUser> applicationSignInManager, LocalizationService localizationService, IAddressBookService addressBookService, MultiShipmentViewModelFactory multiShipmentViewModelFactory, IOrderGroupFactory orderGroupFactory, IContentLoader contentLoader, UrlResolver urlResolver, ICustomerService customerContext, IOrganizationService organizationService, ShipmentViewModelFactory shipmentViewModelFactory, IGiftCardService giftCardService, ISettingsService settingsService) { _pageRouteHelper = pageRouteHelper; _orderRepository = orderRepository; _checkoutViewModelFactory = checkoutViewModelFactory; _cartService = cartService; _orderSummaryViewModelFactory = orderSummaryViewModelFactory; _recommendationService = recommendationService; _checkoutService = checkoutService; _urlHelper = urlHelper; _applicationSignInManager = applicationSignInManager; _localizationService = localizationService; _addressBookService = addressBookService; _multiShipmentViewModelFactory = multiShipmentViewModelFactory; _orderGroupFactory = orderGroupFactory; _contentLoader = contentLoader; _urlResolver = urlResolver; _customerContext = customerContext; _organizationService = organizationService; _shipmentViewModelFactory = shipmentViewModelFactory; _giftCardService = giftCardService; _settingsService = settingsService; }
public ShareThisBlockController( IPageRouteHelper pageRouteHelper, UrlResolver urlResolver) { this.pageRouteHelper = pageRouteHelper; this.urlResolver = urlResolver; }
/// <summary> /// Constructor /// </summary> public BlogCommentBlockController(IBlogCommentRepository commentRepository, IPageRepository pageRepository, IPageRouteHelper pageRouteHelper) { _commentRepository = commentRepository; _pageRepository = pageRepository; _pageRouteHelper = pageRouteHelper; }
public BreadcrumbBlockController(IContentLoader contentLoader, IPageRouteHelper pageRouteHelper) { _contentLoader = contentLoader; _pageRouteHelper = pageRouteHelper; }
public NavigationBlockController(IContentLoader contentLoader, IPageRouteHelper pageRouteHelper) { _contentLoader = contentLoader; _pageRouteHelper = pageRouteHelper; }