function PathChangedHelper::redirect
Same name and namespace in other branches
- 10 core/lib/Drupal/Core/Routing/PathChangedHelper.php \Drupal\Core\Routing\PathChangedHelper::redirect()
Returns a redirect to the new path.
Return value
\Symfony\Component\HttpFoundation\RedirectResponse A redirect response.
File
-
core/
lib/ Drupal/ Core/ Routing/ PathChangedHelper.php, line 106
Class
- PathChangedHelper
- Provides helper functions for handling path changes.
Namespace
Drupal\Core\RoutingCode
public function redirect() : RedirectResponse {
return new RedirectResponse($this->newUrl
->toString(), 301);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.