Webiant Logo Webiant Logo
  1. No results found.

    Try your search with a different keyword or use * as a wildcard.

OmnibusDirectivePlugin.cs

using Nop.Core;
using Nop.Services.Common;
using Nop.Services.Plugins;
using Nop.Services.Security;

namespace Nop.Plugin.Misc.OmnibusDirective;

/// 
/// Represents EU Omnibus Directive plugin
/// 
public class OmnibusDirectivePlugin : BasePlugin, IMiscPlugin
{
    #region Fields

    private readonly IPermissionService _permissionService;
    private readonly IWebHelper _webHelper;

    #endregion

    #region Ctor

    public OmnibusDirectivePlugin(IPermissionService permissionService,
        IWebHelper webHelper)
    {
        _permissionService = permissionService;
        _webHelper = webHelper;
    }

    #endregion

    #region Methods

    /// 
    /// Gets a configuration page URL
    /// 
    public override string GetConfigurationPageUrl()
    {
        return $"{_webHelper.GetStoreLocation()}Admin/OmnibusDirective/Configure";
    }

    /// 
    /// Install the plugin
    /// 
    /// A task that represents the asynchronous operation
    public override async Task InstallAsync()
    {
        await base.InstallAsync();
    }

    /// 
    /// Uninstall the plugin
    /// 
    /// A task that represents the asynchronous operation
    public override async Task UninstallAsync()
    {
        await base.UninstallAsync();
    }

    #endregion
}