我已经创建了一个插件,它可以检查授权状态并提供使用应用程序的权限。这个插件工作得很好,但在整个项目中。我想让它只在管理模块中工作。我该怎么做? 我在application.in i中定义了插件:
resources.frontController.plugins.authcheck = Application_Plugin_AuthCheck
谢谢你的帮助。
一种方式:
admin.resources.frontController.plugins.authcheck = Application_Plugin_AuthCheck
第二种方式: 签入插件模块的名称:
if ($this->getRequest()->getModuleName() == 'admin') { //process }