Request parameters from within view helper

2 messages Options
Embed this post
Permalink
takeshin

Request parameters from within view helper

Reply Threaded More More options
Print post
Permalink
I want my view helper to return unique string based on controller and action.

Is it possible to get request parameters from within view helper?
In the controller I would write $this->_getParams();
but I don't know how to obtain the same in my view helper.

--
regards
takeshin
dmitrybelyakov

Re: Request parameters from within view helper

Reply Threaded More More options
Print post
Permalink

admirau wrote:
I want my view helper to return unique string based on controller and action.

Is it possible to get request parameters from within view helper?
In the controller I would write $this->_getParams();
but I don't know how to obtain the same in my view helper.

--
regards
takeshin
Sure! You can grab it any time from the frontController, like this:

$request=Zend_Controller_Front::getInstance()->getRequest();
$requestParams=$request->getParams();

Good luck,
Dmitry.