Files
Umbraco-CMS/src/Umbraco.Web.BackOffice/Extensions/CompositionExtensions.cs
Bjarke Berg af382e5e71 Migrated section controller + LanguageTreeController, ApplciationTreeController.
Updated AngularJsonOnlyConfigurationAttribute to be a TypeFilterAttribute, to allow injeciton into the filter.

Note: Left TODO about checking authorization of proxied trees..
2020-06-08 13:14:23 +02:00

30 lines
911 B
C#

using Umbraco.Core.Composing;
using Umbraco.Web.Trees;
// the namespace here is intentional - although defined in Umbraco.Web assembly,
// this class should be visible when using Umbraco.Core.Components, alongside
// Umbraco.Core's own CompositionExtensions class
// ReSharper disable once CheckNamespace
namespace Umbraco.Extensions
{
/// <summary>
/// Provides extension methods to the <see cref="Composition"/> class.
/// </summary>
public static class WebCompositionExtensions
{
#region Collection Builders
/// <summary>
/// Gets the back office tree collection builder
/// </summary>
/// <param name="composition"></param>
/// <returns></returns>
public static TreeCollectionBuilder Trees(this Composition composition)
=> composition.WithCollectionBuilder<TreeCollectionBuilder>();
#endregion
}
}