Zend Framework - How to call controller's redirect() from within an action helper?

There is Redirector action helper that you could use in your action helpers. For example.

There is Redirector action helper that you could use in your action helpers. For example: class My_Controller_Action_Helper_Test extends Zend_Controller_Action_Helper_Abstract { public function preDispatch() { $redirector = Zend_Controller_Action_HelperBroker::getStaticHelper('Redirector'); $redirector->gotoUrl('/url'); } } Controller's _redirect method is just a wrapper to the Redirector's gotoUrl method.

Example how to do it in preDispatch(): $request = $this->getActionController()->getRequest(); $urlOptions = array('controller' => 'auth', 'action' => 'login'); $redirector = new Zend_Controller_Action_Helper_Redirector(); $redirector->gotoRouteAndExit($urlOptions, null, true).

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions