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:
loudej
2009-11-30 20:15:52 +00:00
parent 9852c56cb2
commit d39042fda2
10 changed files with 77 additions and 18 deletions

View File

@@ -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> {
}
}

View File

@@ -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>() {
}
}
}

View File

@@ -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));
}