Hi,
I'm very new to this framework .... I'm trying to add a controller action helper but all I get is the following exception
Code:
// The Action Helper Class require_once
'Zend/Controller/Action/Helper/Abstract.php'; class Application_Controllers_Helpers_SideBar extends
Zend_Controller_Action_Helper_Abstract { public function postDispatch() {
echo "hello"; } }exception 'Zend_Controller_Action_Exception' with message 'Action Helper by name SideBar not found.' in
C:\xampp\xampplite\htdocs\zf-tut\library\Zend\Controller\Action\HelperBroker.php:341
in my bootstrap I've added the prefix to the helper thus
Code:
...
// add helper prefix
Zend_Controller_Action_HelperBroker::addPrefix('application_controllers_helpers');
...
my helper class is located in application/controllers/helpers and is called SideBar.php. I've implemented the code as follows
Code:
// The Action Helper Class
require_once 'Zend/Controller/Action/Helper/Abstract.php';
class Application_Controllers_Helpers_SideBar extends Zend_Controller_Action_Helper_Abstract
{
public function postDispatch()
{
echo "hello";
}
}
and in my helper I'm trying to access it by
Code:
if (Zend_Controller_Action_HelperBroker::getStaticHelper('SideBar'))
{
echo 'SideBar helper registered';
}
else
{
echo 'SideBar helper not registered';
}
and this is throwing the exception.
Any help would be appreciated.
Thanks!