removes unused method
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user