开发者

Calling another Action Helper from another action Helper in Zend Framework

开发者 https://www.devze.com 2023-01-25 19:41 出处:网络
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 aja

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)

0

精彩评论

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