/// <summary>
 /// Generates a fully qualified URL to the action method handling the detail of given article.
 /// </summary>
 /// <param name="urlHelper">Url helper</param>
 /// <param name="article">Article object to generate URL for.</param>
 public static string ForArticle(this UrlHelper urlHelper, Article article)
 {
     return urlHelper.Action("Show", "Articles", new
     {
         id = article.NodeID,
         pageAlias = article.NodeAlias
     });
 }
Ejemplo n.º 2
0
 public void SetUp()
 {
     Fake().DocumentType<Article>(Article.CLASS_NAME);
     mArticle = TreeNode.New<Article>().With(a => a.DocumentName = mDocumentName);
     mDependencies = Substitute.For<IOutputCacheDependencies>();
     
     var repository = Substitute.For<IArticleRepository>();
     repository.GetArticle(1).Returns(mArticle);
     
     mController = new ArticlesController(repository, mDependencies);
 }
Ejemplo n.º 3
0
			/// <summary>
			/// Initializes a new instance of the <see cref="CMS.DocumentEngine.Types.Article+ArticleFields" /> class with the specified content item of type Article.
			/// </summary>
			/// <param name="instance">The content item of type Article that is a target of the extended API.</param>
			public ArticleFields(Article instance)
			{
				mInstance = instance;
			}