Question

Is it possible to access controller from action helper?

class Zend_Controller_Action_Helper_UserLimit extends Zend_Controller_Action_Helper_Abstract
{
    public test()
    {
        $this->getController(); // get controller which initiated the helper
    }
}
Était-ce utile?

La solution

Yes, it is possible:

$controller = $this->getActionController();
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top