Calling action helper from action helper problem - undefined view variable

lonelime

New Member
So I have an action helper (from which I call a second action helper):\[code\]<?phpclass My_Controller_Action_Helper_Helper1 extends Zend_Controller_Action_Helper_Abstract{ public function direct() { $theActionController = $this->getActionController(); $helper = Zend_Controller_Action_HelperBroker::getStaticHelper('Helper2'); $helper->direct(theActionController ); }}\[/code\]Here is my second helper, you can see I send a variable to view:\[code\]<?phpclass My_Controller_Action_Helper_Helper2 extends Zend_Controller_Action_Helper_Abstract{ public function direct(theActionController ) { $theActionController->view->a = 'bbb'; }}\[/code\]In my controller I do:\[code\]$this->_helper->helper1();var_dump($this->view->a);\[/code\]The output is:\[code\]NULL\[/code\]Why is that?I send the controller object as an argument to the second helper from the first.
 
Back
Top