You are here

private function RedirectPathTranslatorSubscriber::makeRedirectUrl in Decoupled Router 8

Same name and namespace in other branches
  1. 2.x src/EventSubscriber/RedirectPathTranslatorSubscriber.php \Drupal\decoupled_router\EventSubscriber\RedirectPathTranslatorSubscriber::makeRedirectUrl()

Generates URL for the redirect, based on redirect module configurations.

Parameters

string $path URL to redirect to.:

string $query Original query string on the requested path.:

Return value

string Redirect URL to use.

1 call to RedirectPathTranslatorSubscriber::makeRedirectUrl()
RedirectPathTranslatorSubscriber::onPathTranslation in src/EventSubscriber/RedirectPathTranslatorSubscriber.php
Processes a path translation request.

File

src/EventSubscriber/RedirectPathTranslatorSubscriber.php, line 116

Class

RedirectPathTranslatorSubscriber
Event subscriber that processes a path translation with the redirect info.

Namespace

Drupal\decoupled_router\EventSubscriber

Code

private function makeRedirectUrl($path, $query) {
  return $query && $this->configFactory
    ->get('redirect.settings')
    ->get('passthrough_querystring') ? "{$path}?{$query}" : $path;
}