Zend Controller Action Helper Problem not able to add helper
- by snakeyyy
Trying to make a controller helper to have similar functionality in some controllers using the preDispatch method.
Error:
Fatal error: Class 'Helper_Action_Test' not found in /var/www/zend.dev/application/Bootstrap.php on line 9`
Application layout
/Application
/Helpers
**/Actions** this is where i will save the classes
/Views
/modules
/configs
/layouts
/Bootstrap.php
In the Bootstrap I have added:
protected function _initActionHelpers(){
Zend_Controller_Action_HelperBroker::addHelper(new Helper_Action_Test());
}
In the helper file I have:
class Helper_Action_Test extends Zend_Controller_Action_Helper_Abstract{
public function preDispatch() {
echo 'Test';
}
}
Any ideas?