In a controller, I can call viewRenderer helper like this :
$this->_helper->viewRenderer->setNoRender(true);
How can I call viewRenderer in a controller action helper?
Assume that I have a Controller action helper :
class Zend_Controller_Action_Helper_Ajaxrequest extends Zend_Controller_Action_Helper_Abstract{
public function test(){
//what I should do here
}
}
viewRendererin your example is actually an action helper, not a view helper.To call action helpers, use the helper broker:
If you actually want to call view helpers, you need a view instance. You can get one from the controller: