Adds UmbracoFeatures to the Composition to allow user components to do something like this - composition.Features().Disabled.Controllers.Add<LogViewerTreeController>()

This commit is contained in:
Warren Buckley
2018-11-02 15:33:43 +00:00
parent 61e1301865
commit 2badacb8a8

View File

@@ -11,6 +11,7 @@ using Umbraco.Web.Mvc;
using Umbraco.Web.PublishedCache;
using Umbraco.Web.Routing;
using Umbraco.Web.ContentApps;
using Umbraco.Web.Features;
// the namespace here is intentional - although defined in Umbraco.Web assembly,
// this class should be visible when using Umbraco.Core.Components, alongside
@@ -58,6 +59,9 @@ namespace Umbraco.Core.Components
internal static EditorValidatorCollectionBuilder EditorValidators(this Composition composition)
=> composition.Container.GetInstance<EditorValidatorCollectionBuilder>();
public static UmbracoFeatures Features(this Composition composition)
=> composition.Container.GetInstance<UmbracoFeatures>();
/// <summary>
/// Gets the filtered controller factories collection builder.
/// </summary>