redirectToRoute() protected method

Returns a RedirectResponse to the given route with the given parameters.
protected redirectToRoute ( string $route, array $parameters = [], integer $status = 302 ) : RedirectResponse
$route string The name of the route
$parameters array An array of parameters
$status integer The status code to use for the Response
return Symfony\Component\HttpFoundation\RedirectResponse
Ejemplo n.º 1
0
 public function redirectToRoute($route, array $parameters = array(), $status = 302)
 {
     if ($route instanceof Request) {
         $route = $route->get('_route', 'error_no_route_specified');
     }
     return parent::redirectToRoute($route, $parameters, $status);
 }
Ejemplo n.º 2
0
 public function redirectToRoute($route, array $parameters = array(), $status = 302)
 {
     return parent::redirectToRoute($route, $parameters, $status);
 }
 /**
  * {@inheritdoc}
  *
  * Symfony <2.6 BC. To be removed.
  */
 protected function redirectToRoute($route, array $parameters = array(), $status = 302)
 {
     if (method_exists('Symfony\\Bundle\\FrameworkBundle\\Controller\\Controller', 'redirectToRoute')) {
         return parent::redirectToRoute($route, $parameters, $status);
     }
     return $this->redirect($this->generateUrl($route, $parameters), $status);
 }
 protected function redirectToRoute($route, array $parameters = array(), $status = 302)
 {
     if (!array_key_exists('project', $parameters)) {
         if (!is_null($this->project)) {
             $parameters['project'] = $this->project->getIdentifier();
         }
     }
     return parent::redirectToRoute($route, $parameters, $status);
 }