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-12-21 20:29:53 +00:00
|
|
|
using Orchard.ContentManagement;
|
|
|
|
using Orchard.ContentManagement.Handlers;
|
2009-11-20 23:31:49 +00:00
|
|
|
|
|
|
|
namespace Orchard.Blogs.Models {
|
2009-12-09 22:01:58 +00:00
|
|
|
public class BlogHandler : ContentHandler {
|
2009-11-29 06:08:46 +00:00
|
|
|
public override IEnumerable<ContentType> GetContentTypes() {
|
|
|
|
return new[] { Blog.ContentType };
|
|
|
|
}
|
|
|
|
|
2009-12-09 22:01:58 +00:00
|
|
|
public BlogHandler(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-11-20 23:31:49 +00:00
|
|
|
}
|
|
|
|
}
|
2009-12-21 22:43:10 +00:00
|
|
|
}
|