V14: Remove old backoffice project. (#15752)
* Move magical route to management api * Move auth around * Remove "New" cookies, as they are no longer needed * Move all installer related * Remove BackOfficeServerVariables.cs and trees * Move webhooks to management api * Remove remainting controllers * Remove last services * Move preview to management api * Remove mroe extensions * Remove tours * Remove old Auth handlers * Remove server variables entirely * Remove old backoffice controller * Remove controllers namespace entirely * Move rest of preview * move last services * Move language file extension * Remove old backoffice entirely (Backoffice and Web.UI projects) * Clean up unused security classes * Fix up installer route * Remove obsolete tests * Fix up DI in integration test * Add missing property mapping * Move core mapping into core * Add composers to integration test * remove identity * Fix up DI * Outcomment failing test :) * Fix up remaining test * Update mapper * Remove the actual project files * Remove backoffice cs proj * Remove old backoffice from yml * Run belissima before login * Remove caching * Refactor file paths * Remove belle from static assets * Dont refer to old project in templates * update gitignore * Add missing files * Remove install view as its no longer used * Fix up failing test * Remove outcommented code * Update submodule to latest * fix build --------- Co-authored-by: Bjarke Berg <mail@bergmania.dk>
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
using Umbraco.Cms.Core.Models;
|
||||
|
||||
namespace Umbraco.Cms.Core.Services;
|
||||
|
||||
public interface IIconService
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets the svg string for the icon name found at the global icons path
|
||||
/// </summary>
|
||||
/// <param name="iconName"></param>
|
||||
/// <returns></returns>
|
||||
IconModel? GetIcon(string iconName);
|
||||
|
||||
/// <summary>
|
||||
/// Gets a list of all svg icons found at at the global icons path.
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
IReadOnlyDictionary<string, string>? GetIcons();
|
||||
}
|
||||
@@ -1,30 +0,0 @@
|
||||
using Umbraco.Cms.Core.Trees;
|
||||
|
||||
namespace Umbraco.Cms.Core.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a service which manages section trees.
|
||||
/// </summary>
|
||||
public interface ITreeService
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets a tree.
|
||||
/// </summary>
|
||||
/// <param name="treeAlias">The tree alias.</param>
|
||||
Tree? GetByAlias(string treeAlias);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all trees.
|
||||
/// </summary>
|
||||
IEnumerable<Tree> GetAll(TreeUse use = TreeUse.Main);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all trees for a section.
|
||||
/// </summary>
|
||||
IEnumerable<Tree> GetBySection(string sectionAlias, TreeUse use = TreeUse.Main);
|
||||
|
||||
/// <summary>
|
||||
/// Gets all trees for a section, grouped.
|
||||
/// </summary>
|
||||
IDictionary<string, IEnumerable<Tree>> GetBySectionGrouped(string sectionAlias, TreeUse use = TreeUse.Main);
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
using Umbraco.Cms.Core.Trees;
|
||||
using Umbraco.Extensions;
|
||||
|
||||
namespace Umbraco.Cms.Core.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Implements <see cref="ITreeService" />.
|
||||
/// </summary>
|
||||
public class TreeService : ITreeService
|
||||
{
|
||||
private readonly TreeCollection _treeCollection;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="TreeService" /> class.
|
||||
/// </summary>
|
||||
/// <param name="treeCollection"></param>
|
||||
public TreeService(TreeCollection treeCollection) => _treeCollection = treeCollection;
|
||||
|
||||
/// <inheritdoc />
|
||||
public Tree? GetByAlias(string treeAlias) => _treeCollection.FirstOrDefault(x => x.TreeAlias == treeAlias);
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<Tree> GetAll(TreeUse use = TreeUse.Main)
|
||||
|
||||
// use HasFlagAny: if use is Main|Dialog, we want to return Main *and* Dialog trees
|
||||
=> _treeCollection.Where(x => x.TreeUse.HasFlagAny(use));
|
||||
|
||||
/// <inheritdoc />
|
||||
public IEnumerable<Tree> GetBySection(string sectionAlias, TreeUse use = TreeUse.Main)
|
||||
|
||||
// use HasFlagAny: if use is Main|Dialog, we want to return Main *and* Dialog trees
|
||||
=> _treeCollection.Where(x => x.SectionAlias.InvariantEquals(sectionAlias) && x.TreeUse.HasFlagAny(use))
|
||||
.OrderBy(x => x.SortOrder).ToList();
|
||||
|
||||
/// <inheritdoc />
|
||||
public IDictionary<string, IEnumerable<Tree>>
|
||||
GetBySectionGrouped(string sectionAlias, TreeUse use = TreeUse.Main) =>
|
||||
GetBySection(sectionAlias, use).GroupBy(x => x.TreeGroup).ToDictionary(
|
||||
x => x.Key ?? string.Empty,
|
||||
x => (IEnumerable<Tree>)x.ToArray());
|
||||
}
|
||||
Reference in New Issue
Block a user