public void Destroying(DestroyContentContext context) { }
protected override void Destroyed(DestroyContentContext context) { RecordAuditTrailEvent(ContentAuditTrailEventProvider.Destroyed, context.ContentItem); }
public void Destroyed(DestroyContentContext context) { }
public void Destroy(ContentItem contentItem) { var session = _sessionLocator.Value.For(typeof(ContentItemRecord)); var context = new DestroyContentContext(contentItem); // Give storage filters a chance to delete content part records. Handlers.Invoke(handler => handler.Destroying(context), Logger); // Delete the content item record itself. session .CreateQuery("delete from Orchard.ContentManagement.Records.ContentItemRecord ci where ci.Id = (:id)") .SetParameter("id", contentItem.Id) .ExecuteUpdate(); Handlers.Invoke(handler => handler.Destroyed(context), Logger); }