Calling another Action Helper from another action Helper in Zend Framework
Is it possible to call another action helper from another action helper. Actually I have created an action helper which preform some layout related stuff using preDispatch hook. Now I want to call ajaxContext within my first action helper's preDispatch method. any ideas how can I ach开发者_高级运维ieve this?
You can use the Zend_Controller_Action_HelperBroker to fetch other helpers.
If you extend from Zend's abstract class you can use actionController variable to access controller and use sth. like $this->_actionController->layout(); (for layout action helper)
精彩评论