You are here

public function LogouttabController::logout in Logout Tab 8

Redirects user to configured logout page.

Return value

\Symfony\Component\HttpFoundation\RedirectResponse Redirect to configured page.

1 string reference to 'LogouttabController::logout'
logouttab.routing.yml in ./logouttab.routing.yml
logouttab.routing.yml

File

src/Controller/LogouttabController.php, line 20

Class

LogouttabController
Implements redirect from logout tab.

Namespace

Drupal\logouttab\Controller

Code

public function logout() {
  $url = Url::fromUserInput('/' . $this
    ->config('logouttab.settings')
    ->get('url'));
  return new RedirectResponse($url
    ->setAbsolute()
    ->toString());
}