public ArticlePrologueShareViewModel(
            ITextTranslator textTranslator,
            IRenderingItemContext articleRenderingContext)
        {
            TextTranslator = textTranslator;

            _article = new Lazy <IArticle>(articleRenderingContext.Get <IArticle>);
        }
 public EmailArticlePopOutViewModel(
     ITextTranslator textTranslator,
     IRenderingItemContext articleRenderingContext,
     IAuthenticatedUserContext userContext)
 {
     TextTranslator          = textTranslator;
     ArticleRenderingContext = articleRenderingContext;
     UserContext             = userContext;
     Article = ArticleRenderingContext.Get <IArticle>();
 }
 public UserPageEntitlementViewModel(
     IRenderingItemContext renderingItemContext,
     IEntitledProductContext entitledProductContext,
     IEntitlementProductFactory entitledProductFactory,
     IEntitlementAccessContext entitlementAccessContext)
 {
     RenderingItemContext     = renderingItemContext;
     EntitledProductContext   = entitledProductContext;
     EntitledProductFactory   = entitledProductFactory;
     EntitlementAccessContext = entitlementAccessContext;
 }
Ejemplo n.º 4
0
        public ArticleTagsViewModel(
            IRenderingItemContext articleRenderingContext)
        {
            ArticleRenderingContext = articleRenderingContext;

            Tags = ArticleRenderingContext.Get <I___BaseTaxonomy>().Taxonomies.Take(3).Select(x => new LinkableModel
            {
                LinkableText = x.Item_Name,
                LinkableUrl  = SearchTaxonomyUtil.GetSearchUrl(x)
            });
        }
Ejemplo n.º 5
0
 public AsktheAnalystPopOutViewModel(
     ISiteRootContext siteRootContext,
     ITextTranslator textTranslator,
     IRenderingItemContext articleRenderingContext,
     IAuthenticatedUserContext userContext)
 {
     SiteRootContext         = siteRootContext;
     TextTranslator          = textTranslator;
     ArticleRenderingContext = articleRenderingContext;
     UserContext             = userContext;
     Article = ArticleRenderingContext.Get <IArticle>();
 }
Ejemplo n.º 6
0
        public EmailAuthorPopOutViewModel(
            ITextTranslator textTranslator,
            IRenderingItemContext articleRenderingContext,
            IAuthenticatedUserContext userContext,
            IAuthorIndexClient authorIndexClient,
            IHttpContextProvider httpContext)
        {
            TextTranslator          = textTranslator;
            ArticleRenderingContext = articleRenderingContext;
            UserContext             = userContext;
            AuthorIndexClient       = authorIndexClient;
            HttpContext             = httpContext;

            Author = AuthorIndexClient.GetAuthorByUrlName(HttpContext.Current.Request.Url.Segments.Last());
        }
Ejemplo n.º 7
0
        public ArticlePrologueBookmarkViewModel(
            ITextTranslator textTranslator,
            IRenderingItemContext articleRenderingContext,
            IAuthenticatedUserContext authenticatedUserContext,
            IIsSavedDocumentContext isSavedDocuementContext,
            ISiteRootContext siteRootContext,
            IArticleService articleService)
        {
            TextTranslator  = textTranslator;
            SiteRootContext = siteRootContext;
            ArticleService  = articleService;

            Article             = articleRenderingContext.Get <IArticle>();
            IsUserAuthenticated = authenticatedUserContext.IsAuthenticated;
            IsArticleBookmarked = IsUserAuthenticated && isSavedDocuementContext.IsSaved(Article._Id);
            BookmarkPublication = ArticleService.GetArticlePublicationName(Article);
            BookmarkTitle       = Article?.Title;
        }
Ejemplo n.º 8
0
 public GlassRenderingItemContext(
     IRenderingItemContext renderingItemContext)
 {
     RenderingItemContext = renderingItemContext;
 }