I'm writing a custom Helper class by extending Zend_Controller_Action_Helper_Abstract. Inside this Helper class I want to make use of FlashMessenger to show messages when needed. I want to discriminate warning, success, and error messages ( no, I'm not a racist ).
In a class which extends Zend_Controller_Action
I do that something like this, see below.
$this->_helper->FlashMessenger(array('error' => 'An error occured'));
When writing a Helper class, which extends Zend_Controller_Action_Helper_Abstract
you can get the Helpername by using the getActionController()
and getHelper
methods together. See below.
$this->getActionController()->getHelper('FlashMessenger');
I want to add the array('error' => 'An error occured')
as an argument to the FlashMessenger helper inside the getHelper mehod. I was wondering, is it possible to add arguments to the FlashMessenger Helper through getHelper? If not, then how can you work around this?