Bit of cleanup
This commit is contained in:
@@ -2,12 +2,10 @@
|
||||
using System.Linq;
|
||||
using Umbraco.Core.Composing;
|
||||
using Umbraco.Core.Manifest;
|
||||
using Umbraco.Core.Models.ContentEditing;
|
||||
using Umbraco.Web.Models.Trees;
|
||||
using Umbraco.Core.Models.Trees;
|
||||
|
||||
namespace Umbraco.Web.Trees
|
||||
{
|
||||
//fixme: how can a developer re-sort the items in this collection ?
|
||||
public class BackOfficeSectionCollectionBuilder : OrderedCollectionBuilderBase<BackOfficeSectionCollectionBuilder, BackOfficeSectionCollection, IBackOfficeSection>
|
||||
{
|
||||
protected override BackOfficeSectionCollectionBuilder This => this;
|
||||
@@ -19,20 +17,7 @@ namespace Umbraco.Web.Trees
|
||||
// its dependencies too, and that can create cycles or other oddities
|
||||
var manifestParser = factory.GetInstance<ManifestParser>();
|
||||
|
||||
return base.CreateItems(factory)
|
||||
.Concat(manifestParser.Manifest.Sections.Select(x => new ManifestBackOfficeSection(x.Key, x.Value)));
|
||||
}
|
||||
|
||||
private class ManifestBackOfficeSection : IBackOfficeSection
|
||||
{
|
||||
public ManifestBackOfficeSection(string @alias, string name)
|
||||
{
|
||||
Alias = alias;
|
||||
Name = name;
|
||||
}
|
||||
|
||||
public string Alias { get; }
|
||||
public string Name { get; }
|
||||
return base.CreateItems(factory).Concat(manifestParser.Manifest.Sections);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user