Updates the base editor models to include a readonly UDI, updates all model mappers to map the UDI,

This commit is contained in:
Shannon
2017-01-28 01:14:24 +11:00
parent 547351a719
commit 9ef53536bf
20 changed files with 182 additions and 60 deletions

View File

@@ -20,6 +20,7 @@ namespace Umbraco.Web.Models.Mapping
{
//FROM IMacro TO EntityBasic
config.CreateMap<IMacro, EntityBasic>()
.ForMember(x => x.Udi, expression => expression.MapFrom(content => Udi.Create(Constants.UdiEntityType.Macro, content.Key)))
.ForMember(entityBasic => entityBasic.Icon, expression => expression.UseValue("icon-settings-alt"))
.ForMember(dto => dto.ParentId, expression => expression.UseValue(-1))
.ForMember(dto => dto.Path, expression => expression.ResolveUsing(macro => "-1," + macro.Id))