public void SaveConfiguration(SaveConfigurationCommand saveConfigurationCommand)
 {
     var objectType = Mappings.TreeNodeObjectTypes[new TreeNodeType("settings", saveConfigurationCommand.Type)];
     var mappedObjectType = objectType == UmbracoObjectTypes.DocumentType ? 
         UmbracoObjectTypes.Document : 
         UmbracoObjectTypes.Media;
     var contentType = objectType == UmbracoObjectTypes.DocumentType ?
         (IContentTypeBase)ContentTypeService.GetContentType(saveConfigurationCommand.Id) :
         ContentTypeService.GetMediaType(saveConfigurationCommand.Id);
     RelationEditor.Configuration.Set(mappedObjectType, contentType.Alias, saveConfigurationCommand.Configuration);
 }
Exemple #2
0
        public void SaveConfiguration(SaveConfigurationCommand saveConfigurationCommand)
        {
            var objectType       = Mappings.TreeNodeObjectTypes[new TreeNodeType("settings", saveConfigurationCommand.Type)];
            var mappedObjectType = objectType == UmbracoObjectTypes.DocumentType ?
                                   UmbracoObjectTypes.Document :
                                   UmbracoObjectTypes.Media;
            var contentType = objectType == UmbracoObjectTypes.DocumentType ?
                              (IContentTypeBase)ContentTypeService.GetContentType(saveConfigurationCommand.Id) :
                              ContentTypeService.GetMediaType(saveConfigurationCommand.Id);

            RelationEditor.Configuration.Set(mappedObjectType, contentType.Alias, saveConfigurationCommand.Configuration);
        }
        public void SaveConfiguration(SaveConfigurationCommand saveConfigurationCommand)
        {
            var legacyTreeNodeType     = new TreeNodeType("settings", saveConfigurationCommand.Type);
            var sevenThreeTreeNodeType = new TreeNodeType(saveConfigurationCommand.Type, null);
            var objectType             = Mappings.TreeNodeObjectTypes.ContainsKey(legacyTreeNodeType) ?
                                         Mappings.TreeNodeObjectTypes[legacyTreeNodeType] :
                                         Mappings.TreeNodeObjectTypes[sevenThreeTreeNodeType];
            var contentTypes     = ContentTypeService.GetAllContentTypes().ToList();
            var mappedObjectType = objectType == UmbracoObjectTypes.DocumentType ?
                                   UmbracoObjectTypes.Document :
                                   UmbracoObjectTypes.Media;
            var contentType = objectType == UmbracoObjectTypes.DocumentType ?
                              (IContentTypeBase)ContentTypeService.GetContentType(saveConfigurationCommand.Id) :
                              ContentTypeService.GetMediaType(saveConfigurationCommand.Id);

            RelationEditor.Configuration.Set(mappedObjectType, contentType.Alias, saveConfigurationCommand.Configuration);
        }