问题描述
最近我试图了解 NopCommerce 插件的工作原理。
我会尽量让我的问题更清楚,让您明白,而无需在您的计算机上打开解决方案。
在 nopCommerce 插件中,一切都始于一个类,该类必须具有 IWidgetPlugin 接口的定义并从 BasePlugin 派生。
在一个预定义的插件中有一个名为 NivoSliderPlugin 的类,这个类覆盖了它的一些基类方法,并定义了 IWidgetPlugin 的方法。
代码如下:
public class NivoSliderPlugin : BasePlugin,IWidgetPlugin
{
// Here there are some fields that are referencing to different interfaces and then
they're injected to the class throw it's constructor
// This method gets a configuration page URL
public override string GetConfigurationPageUrl()
{
return _webHelper.GetStoreLocation() + "Admin/WidgetsNivoSlider/Configure";
}
}
在上面的代码中,我只提到了我有疑问的部分代码。
_webHelper 是对接口的引用,并接受 bool 类型的传入参数。
不管返回的第二部分,我的意思是“Admin/WidgetsNivoSlider/Configure”的 URL 路径,我想知道 _webHelper.GetStoreLocation() 是如何工作的?
如你所知 _webHelper.GetStoreLocation() 没有定义!
我希望我刚才问的有道理。 如果不清楚,请让我知道以使其更清楚。 我会很感激的。
解决方法
暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!
如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。
小编邮箱:dio#foxmail.com (将#修改为@)