getRedirect() public method

Returns the redirect url.
public getRedirect ( ) : string
return string
Ejemplo n.º 1
0
 /**
  * @return Route
  */
 protected function getRedirectWebSpaceRoute()
 {
     $localization = $this->defaultLocaleProvider->getDefaultLocale();
     $redirect = $this->requestAnalyzer->getRedirect();
     $redirect = $this->urlReplacer->replaceCountry($redirect, $localization->getCountry());
     $redirect = $this->urlReplacer->replaceLanguage($redirect, $localization->getLanguage());
     $redirect = $this->urlReplacer->replaceLocalization($redirect, $localization->getLocale(Localization::DASH));
     // redirect by information from webspace config
     // has to be done for all routes, because double slashes introduce problems otherwise
     return new Route('/{wildcard}', ['_controller' => 'SuluWebsiteBundle:Redirect:redirectWebspace', 'url' => $this->requestAnalyzer->getPortalUrl(), 'redirect' => $redirect], ['wildcard' => '.*']);
 }
Ejemplo n.º 2
0
 /**
  * @param Request $request
  *
  * @return Route
  */
 protected function getRedirectWebSpaceRoute(Request $request)
 {
     // redirect by information from webspace config
     return new Route($request->getPathInfo(), ['_controller' => 'SuluWebsiteBundle:Default:redirectWebspace', 'url' => $this->requestAnalyzer->getPortalUrl(), 'redirect' => $this->requestAnalyzer->getRedirect()]);
 }