You are here

public function Lingotek::redirect in Lingotek Translation 8

Returns a redirect response object for the specified route.

Parameters

string $route_name: The name of the route to which to redirect.

array $route_parameters: Parameters for the route.

int $status: The HTTP redirect status code for the redirect. The default is 302 Found.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse A redirect response object that may be returned by any controller.

Overrides UrlGeneratorTrait::redirect

File

src/Lingotek.php, line 436
Contains \Drupal\lingotek\Lingotek.

Class

Lingotek

Namespace

Drupal\lingotek

Code

public function redirect($route_name, array $route_parameters = array(), $status = 302) {
  $url = $this
    ->url($route_name, $route_parameters, [
    'absolute' => TRUE,
  ]);
  return new RedirectResponse($url, $status);
}