2009-11-29 06:08:46 +00:00
|
|
|
using System.Collections.Generic;
|
2009-11-24 02:03:13 +00:00
|
|
|
using Orchard.Core.Common.Models;
|
2009-11-20 23:31:49 +00:00
|
|
|
using Orchard.Data;
|
2009-11-29 06:08:46 +00:00
|
|
|
using Orchard.Models;
|
2009-11-20 23:31:49 +00:00
|
|
|
using Orchard.Models.Driver;
|
|
|
|
|
|
|
|
namespace Orchard.Blogs.Models {
|
2009-11-21 09:17:22 +00:00
|
|
|
public class BlogProvider : ContentProvider {
|
2009-11-29 06:08:46 +00:00
|
|
|
public override IEnumerable<ContentType> GetContentTypes() {
|
|
|
|
return new[] { Blog.ContentType };
|
|
|
|
}
|
|
|
|
|
2009-11-21 09:17:22 +00:00
|
|
|
public BlogProvider(IRepository<BlogRecord> repository) {
|
2009-11-20 23:31:49 +00:00
|
|
|
Filters.Add(new ActivatingFilter<Blog>("blog"));
|
2009-11-24 02:03:13 +00:00
|
|
|
Filters.Add(new ActivatingFilter<CommonAspect>("blog"));
|
|
|
|
Filters.Add(new ActivatingFilter<RoutableAspect>("blog"));
|
2009-11-21 09:47:18 +00:00
|
|
|
Filters.Add(new StorageFilter<BlogRecord>(repository));
|
2009-12-08 09:21:13 +00:00
|
|
|
Filters.Add(new ContentItemTemplates<Blog>("Blog", "Detail", "DetailAdmin", "Summary", "SummaryAdmin"));
|
2009-11-20 23:31:49 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|