Domanda

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
    }
}
È stato utile?

Soluzione

Yes, it is possible:

$controller = $this->getActionController();
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top