protected virtual void FireAfterRemoveProtection(Document doc, RemoveProtectionEventArgs e) { if (AfterRemoveProtection != null) { AfterRemoveProtection(doc, e); } }
protected virtual void FireBeforeRemoveProtection(Document doc, RemoveProtectionEventArgs e) { if (BeforeRemoveProtection != null) { BeforeRemoveProtection(doc, e); } }
public static void RemoveProtection(int DocumentId) { XmlElement x = (XmlElement)getPage(DocumentId); if (x != null) { //event RemoveProtectionEventArgs e = new RemoveProtectionEventArgs(); new Access().FireBeforeRemoveProtection(new Document(DocumentId), e); if (!e.Cancel) { x.ParentNode.RemoveChild(x); save(); clearCheckPages(); new Access().FireAfterRemoveProtection(new Document(DocumentId), e); } } }
public static void RemoveProtection(int DocumentId) { //event var doc = new Document(DocumentId); var e = new RemoveProtectionEventArgs(); new Access().FireBeforeRemoveProtection(doc, e); if (e.Cancel) { return; } var entry = ApplicationContext.Current.Services.PublicAccessService.GetEntryForContent(doc.ContentEntity); if (entry != null) { ApplicationContext.Current.Services.PublicAccessService.Delete(entry); } Save(); new Access().FireAfterRemoveProtection(doc, e); }
void Access_AfterRemoveProtection(global::umbraco.cms.businesslogic.web.Document sender, RemoveProtectionEventArgs e) { ((UmbracoSiteMapProvider)System.Web.SiteMap.Provider).UpdateNode(new NodeFactory.Node(sender.Id)); }
protected virtual void FireAfterRemoveProtection(Document doc, RemoveProtectionEventArgs e) { if (AfterRemoveProtection != null) AfterRemoveProtection(doc, e); }
protected virtual void FireBeforeRemoveProtection(Document doc, RemoveProtectionEventArgs e) { if (BeforeRemoveProtection != null) BeforeRemoveProtection(doc, e); }
public static void RemoveProtection(int DocumentId) { XmlElement x = (XmlElement) getPage(DocumentId); if (x != null) { //event RemoveProtectionEventArgs e = new RemoveProtectionEventArgs(); new Access().FireBeforeRemoveProtection(new Document(DocumentId), e); if (!e.Cancel) { x.ParentNode.RemoveChild(x); save(); clearCheckPages(); new Access().FireAfterRemoveProtection(new Document(DocumentId), e); } } }