mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2026-01-23 13:22:08 +08:00
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4045249
21 lines
948 B
C#
21 lines
948 B
C#
using JetBrains.Annotations;
|
|
using Orchard.Blogs.Controllers;
|
|
using Orchard.Core.Common.Models;
|
|
using Orchard.ContentManagement.Handlers;
|
|
using Orchard.Core.Common.Records;
|
|
using Orchard.Data;
|
|
|
|
namespace Orchard.Blogs.Models {
|
|
[UsedImplicitly]
|
|
public class BlogPostHandler : ContentHandler {
|
|
public BlogPostHandler(IRepository<CommonVersionRecord> commonRepository) {
|
|
Filters.Add(new ActivatingFilter<BlogPost>(BlogPostDriver.ContentType.Name));
|
|
Filters.Add(new ActivatingFilter<CommonAspect>(BlogPostDriver.ContentType.Name));
|
|
Filters.Add(new ActivatingFilter<RoutableAspect>(BlogPostDriver.ContentType.Name));
|
|
Filters.Add(new ActivatingFilter<BodyAspect>(BlogPostDriver.ContentType.Name));
|
|
Filters.Add(new StorageFilter<CommonVersionRecord>(commonRepository));
|
|
|
|
OnCreated<BlogPost>((context, bp) => bp.Blog.PostCount++);
|
|
}
|
|
}
|
|
} |