I am trying to make an HTTP redirection for a route with 3 parameters and I have problems
My route:
$router->add("/panel/:controller/:action/:params",array(
"module" => "panel",
"controller" => 1,
"action" => 2,
"params" => 3,
))->setName("panel");
All options I have tried in my controller:
// generates /panel/index/index
return $this->response->redirect(array(
'for' => 'panel',
'controller' => 'index',
'action' => 'index',
0 => 'param1',
1 => 'param2',
2 => 'param3',
));
// generates /panel/index/index/Array
return $this->response->redirect(array(
'for' => 'panel',
'controller' => 'index',
'action' => 'index',
'params' => array(
0 => 'param1',
1 => 'param2',
2 => 'param3',
)));
// generates /panel/index/index/Array
return $this->response->redirect(array(
'for' => 'panel',
'controller' => 'index',
'action' => 'index',
'params' => array(
'param1',
'param2',
'param3',
)));
However:
// generates /panel/index/index/param1
return $this->response->redirect(array(
'for' => 'panel',
'controller' => 'index',
'action' => 'index',
'params' => 'param1'
));
//works but it is not what I need : /
return $this->dispatcher->forward(array(
'for' => 'panel',
'controller' => 'index',
'action' => 'index',
'params' => array('param1','param2','param3'),
));
Is it possible to make such a redirection?
TIA!