mirror of https://github.com/abpframework/abp.git
csharpabpc-sharpframeworkblazoraspnet-coredotnet-coreaspnetcorearchitecturesaasdomain-driven-designangularmulti-tenancy
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
32 lines
794 B
32 lines
794 B
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using Volo.Abp.DependencyInjection;
|
|
|
|
namespace Volo.Abp.SettingManagement.Web.Pages.SettingManagement;
|
|
|
|
public class SettingPageCreationContext : IServiceProviderAccessor
|
|
{
|
|
public IServiceProvider ServiceProvider { get; }
|
|
|
|
public List<SettingPageGroup> Groups { get; }
|
|
|
|
public SettingPageCreationContext(IServiceProvider serviceProvider)
|
|
{
|
|
ServiceProvider = serviceProvider;
|
|
|
|
Groups = new List<SettingPageGroup>();
|
|
}
|
|
|
|
public void Normalize()
|
|
{
|
|
Order();
|
|
}
|
|
|
|
private void Order()
|
|
{
|
|
var orderedItems = Groups.OrderBy(item => item.Order).ThenBy(item => item.DisplayName).ToArray();
|
|
Groups.Clear();
|
|
Groups.AddRange(orderedItems);
|
|
}
|
|
}
|
|
|