34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
using Umbraco.Core.Composing;
|
|
using Umbraco.ModelsBuilder.Embedded.BackOffice;
|
|
using Umbraco.Web.Features;
|
|
|
|
namespace Umbraco.ModelsBuilder.Embedded.Compose
|
|
{
|
|
// TODO: This needs to die, see TODO in ModelsBuilderComposer. This is also no longer used in this netcore
|
|
// codebase. Potentially this could be changed to ext methods if necessary that could be used by end users who will
|
|
// install the community MB package to disable any built in MB stuff.
|
|
|
|
/// <summary>
|
|
/// Special component used for when MB is disabled with the legacy MB is detected
|
|
/// </summary>
|
|
public sealed class DisabledModelsBuilderComponent : IComponent
|
|
{
|
|
private readonly UmbracoFeatures _features;
|
|
|
|
public DisabledModelsBuilderComponent(UmbracoFeatures features)
|
|
{
|
|
_features = features;
|
|
}
|
|
|
|
public void Initialize()
|
|
{
|
|
//disable the embedded dashboard controller
|
|
_features.Disabled.Controllers.Add<ModelsBuilderDashboardController>();
|
|
}
|
|
|
|
public void Terminate()
|
|
{
|
|
}
|
|
}
|
|
}
|