removes unused method

This commit is contained in:
Shannon
2018-04-10 13:49:09 +10:00
parent c17217fc10
commit 53dc83ca16

View File

@@ -1160,27 +1160,6 @@ namespace Umbraco.Web.Editors
return display;
}
/// <summary>
/// Used to map an <see cref="IContent"/> instance to a <see cref="ContentItemBasic"/> and ensuring a language is present if required
/// </summary>
/// <param name="content"></param>
/// <param name="languageId"></param>
/// <returns></returns>
private ContentItemBasic<ContentPropertyBasic, IContent> MapToBasic(IContent content, int? languageId = null)
{
//a languageId must exist in the mapping context if this content item has any property type that can be varied by language
//otherwise the property validation will fail since it's expecting to be get/set with a language ID. If a languageId is not explicitly
//sent up, then it means that the user is editing the default variant language.
if (!languageId.HasValue && content.HasLanguageVariantPropertyType())
{
languageId = Services.LocalizationService.GetDefaultVariantLanguage().Id;
}
var basic = ContextMapper.Map<IContent, ContentItemBasic<ContentPropertyBasic, IContent>>(content, UmbracoContext,
new Dictionary<string, object> { { ContextMapper.LanguageKey, languageId } });
return basic;
}
}
}