static private ApplyChangesInEditor ( |
||
contentType | ||
editor | SchemaEditor | |
return | void |
private void Install(CTD ctd) { ContentType contentType = ContentTypeManager.LoadOrCreateNew(ctd.Document); ContentTypeManager.ApplyChangesInEditor(contentType, _editor); contentType.Save(false); ContentTypeManager.Current.AddContentType(contentType); }
private void Install(CTD ctd) { var contentType = ContentTypeManager.LoadOrCreateNew(ctd.Document); // skip notification during content type install to avoid missing field errors contentType.DisableObserver(TypeResolver.GetType(NodeObserverNames.NOTIFICATION, false)); ContentTypeManager.ApplyChangesInEditor(contentType, _editor); contentType.Save(false); ContentTypeManager.Current.AddContentType(contentType); }
private void Install(Ctd ctd) { var contentType = ContentTypeManager.LoadOrCreateNew(ctd.Document); if (contentType.IsInvalid) { // registering a content type with an invalid handler or field is not allowed throw new ContentRegistrationException( $"Error during installing content type {contentType.Name}. Please check the log for " + "a registration error or warning."); } // skip notification during content type install to avoid missing field errors contentType.DisableObserver(TypeResolver.GetType(NodeObserverNames.NOTIFICATION, false)); ContentTypeManager.ApplyChangesInEditor(contentType, _editor); contentType.Save(false); ContentTypeManager.Instance.AddContentType(contentType); }