mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-24 13:33:34 +08:00
Moving ContentType definitions into ItemDriver implementations
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4044436
This commit is contained in:
@@ -11,15 +11,23 @@ using Orchard.ContentManagement.ViewModels;
|
||||
namespace Orchard.Blogs.Controllers {
|
||||
[UsedImplicitly]
|
||||
public class BlogDriver : ItemDriver<Blog> {
|
||||
public readonly static ContentType ContentType = new ContentType {
|
||||
Name = "blog",
|
||||
DisplayName = "Blog"
|
||||
};
|
||||
|
||||
private readonly IContentManager _contentManager;
|
||||
private readonly IBlogPostService _blogPostService;
|
||||
|
||||
public BlogDriver(IContentManager contentManager, IBlogPostService blogPostService)
|
||||
: base(Blog.ContentType) {
|
||||
public BlogDriver(IContentManager contentManager, IBlogPostService blogPostService) {
|
||||
_contentManager = contentManager;
|
||||
_blogPostService = blogPostService;
|
||||
}
|
||||
|
||||
protected override ContentType GetContentType() {
|
||||
return ContentType;
|
||||
}
|
||||
|
||||
protected override string Prefix { get { return ""; } }
|
||||
|
||||
protected override string GetDisplayText(Blog item) {
|
||||
|
Reference in New Issue
Block a user