Removes the need to do any lookup for GetNonGroupedProperties, we already know if they belong to a non-group based on the ID
This commit is contained in:
@@ -106,15 +106,12 @@ namespace Umbraco.Core
|
||||
/// Returns properties that do not belong to a group
|
||||
/// </summary>
|
||||
/// <param name="content"></param>
|
||||
/// <param name="contentTypeBaseService"></param>
|
||||
/// <returns></returns>
|
||||
public static IEnumerable<Property> GetNonGroupedProperties(this IContentBase content, IContentTypeBaseServiceProvider contentTypeBaseService)
|
||||
public static IEnumerable<Property> GetNonGroupedProperties(this IContentBase content)
|
||||
{
|
||||
var contentType = contentTypeBaseService.GetContentTypeOf(content);
|
||||
var propertyIdsInTabs = contentType.PropertyGroups.SelectMany(pg => pg.PropertyTypes);
|
||||
return content.Properties
|
||||
.Where(property => propertyIdsInTabs.Contains(property.PropertyType) == false)
|
||||
.OrderBy(x => x.PropertyType.SortOrder);
|
||||
.Where(x => x.PropertyType.PropertyGroupId == null)
|
||||
.OrderBy(x => x.PropertyType.SortOrder);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
||||
Reference in New Issue
Block a user