Hi,

I try to write an ActionHelper but I get stuck. The problem is that I
can't access $this->_actionController within my Helper class. It
complains.

Notice: Undefined property: IndexController::$_actionController
in /www/quasda/library/Zend/Controller/Action/HelperBroker.php on line
203

The helper itself gets loaded, but not proper initialized. What can I
do?

Here's the code:
class Quasda_User_Helpers_UserHelper extends
Zend_Controller_Action_Helper_Abstract
{

    public function doSmth()
    {
        $this->_actionController->_forward('login');
    }

    public function init()
    {
        echo "<h1>" . "init" . "</h1>\n";
    }
}

----------------------------
In my controller I use smth like this:

public function init()
{
Zend_Controller_Action_HelperBroker::addPrefix('Quasda_User_Helpers');
$helper = Zend_Controller_Action_HelperBroker::getHelper("User_Helper");
$helper->doSmth();
}


The output in this case is:

Notice: Undefined property: IndexController::$_actionController
in /www/quasda/library/Zend/Controller/Action/HelperBroker.php on line
203

init

Fatal error: Call to a member function _forward() on a non-object
in /www/quasda/library/Quasda/User/Helpers/UserHelper.php on line 8


Reply via email to