mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-10-15 19:54:57 +08:00
Adding ContentType class and GetContentTypes methods to IContentManager and IContentProvider
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042626
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Data;
|
||||
using Orchard.Models;
|
||||
@@ -5,6 +6,10 @@ using Orchard.Models.Driver;
|
||||
|
||||
namespace Orchard.Blogs.Models {
|
||||
public class BlogPostProvider : ContentProvider {
|
||||
public override IEnumerable<ContentType> GetContentTypes() {
|
||||
return new[] { BlogPost.ContentType };
|
||||
}
|
||||
|
||||
public BlogPostProvider(IRepository<BlogPostRecord> repository, IContentManager contentManager) {
|
||||
Filters.Add(new ActivatingFilter<BlogPost>("blogpost"));
|
||||
Filters.Add(new ActivatingFilter<CommonAspect>("blogpost"));
|
||||
|
Reference in New Issue
Block a user