开发者

Zend Framework - Getting a helper from within a registered plugin

Is there any way to get access to a helper class from within a registered plugin. From within the controller, one can use:

$this->_helper->getHelper($helperName);

Specifically, we use the FlashMessenger helper to pass error and info messages around to different pages before we do a redirect. In one of our plugins, we log a user out and set the index and controller to a different page. We could manually set a value in the request but this seems to go against what the FlashMessenger is supposed to be used f开发者_开发百科or and we'd have to do that just for this special case.


You should use the action helper broker to retrieve a helper anywhere outside a controller. See the similar question:

zend-framework, call an action helper from within another action helper

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜