Pergunta

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
    }
}
Foi útil?

Solução

Yes, it is possible:

$controller = $this->getActionController();
Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top