mirror of
https://github.com/OrchardCMS/Orchard.git
synced 2025-09-22 20:13:50 +08:00
Changing AddOnXxx to OnXxx in the content provider. Starting to hook up BodyAspect.
--HG-- extra : convert_revision : svn%3A5ff7c347-ad56-4c35-b696-ccb81de16e03/trunk%4042764
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
using Orchard.Core.Common.Records;
|
||||
using Orchard.Models;
|
||||
|
||||
namespace Orchard.Core.Common.Models {
|
||||
public class BodyAspect : ContentPart {
|
||||
public string Body { get; set; }
|
||||
public string Format { get; set; }
|
||||
public class BodyAspect : ContentPart<BodyRecord> {
|
||||
}
|
||||
}
|
||||
|
@@ -1,7 +1,18 @@
|
||||
using System;
|
||||
using Orchard.Core.Common.Models;
|
||||
using Orchard.Core.Common.Records;
|
||||
using Orchard.Data;
|
||||
using Orchard.Models.Driver;
|
||||
|
||||
namespace Orchard.Core.Common.Providers {
|
||||
public class BodyAspectProvider : ContentProvider {
|
||||
public BodyAspectProvider(IRepository<BodyRecord> bodyRepository) {
|
||||
Filters.Add(new StorageFilter<BodyRecord>(bodyRepository));
|
||||
OnGetEditors<BodyAspect>();
|
||||
}
|
||||
|
||||
private void OnGetEditors<TPart>() {
|
||||
|
||||
}
|
||||
}
|
||||
}
|
@@ -23,9 +23,9 @@ namespace Orchard.Core.Common.Providers {
|
||||
_authenticationService = authenticationService;
|
||||
_contentManager = contentManager;
|
||||
|
||||
AddOnActivated<CommonAspect>(PropertySetHandlers);
|
||||
AddOnCreating<CommonAspect>(DefaultTimestampsAndOwner);
|
||||
AddOnLoaded<CommonAspect>(LazyLoadHandlers);
|
||||
OnActivated<CommonAspect>(PropertySetHandlers);
|
||||
OnCreating<CommonAspect>(DefaultTimestampsAndOwner);
|
||||
OnLoaded<CommonAspect>(LazyLoadHandlers);
|
||||
Filters.Add(new StorageFilter<CommonRecord>(repository));
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user