I have created a plugin, that ckecks authorization status and gives access for using application. This plugin works fine, but in whole project. I want to make it works only in admin module. How can I do this? I have defined plugin in application.ini:
resources.frontController.plugins.authche开发者_运维技巧ck = Application_Plugin_AuthCheck
Thanks for your help.
One way:
admin.resources.frontController.plugins.authcheck = Application_Plugin_AuthCheck
Second way: check in plugin module's name:
if ($this->getRequest()->getModuleName() == 'admin') {
//process
}
精彩评论