Right now when I want to redirect after an action in my controller I need to write :
function anActionAction(){
$this->redirect("a string url like mysite/controller/action");
}
Is there a way to build the url a cleaner way?
For instance in the view script, if I want to get an action I use the url helper with an array like:
echo $this->url(array('controller'=>'snippets','action'=>'index'));
So is there a way to pass an array instead of a string in the redirect method?
Thanks.
Use the Redirector Action Helper:
This will indirectly call the
gotoSimple()method of this action helper.