LogouttabController.php in Logout Tab 8
Namespace
Drupal\logouttab\ControllerFile
src/Controller/LogouttabController.phpView source
<?php
namespace Drupal\logouttab\Controller;
use Drupal\Core\Controller\ControllerBase;
use Drupal\Core\Url;
use Symfony\Component\HttpFoundation\RedirectResponse;
/**
* Implements redirect from logout tab.
*/
class LogouttabController extends ControllerBase {
/**
* Redirects user to configured logout page.
*
* @return \Symfony\Component\HttpFoundation\RedirectResponse
* Redirect to configured page.
*/
public function logout() {
$url = Url::fromUserInput('/' . $this
->config('logouttab.settings')
->get('url'));
return new RedirectResponse($url
->setAbsolute()
->toString());
}
}
Classes
Name | Description |
---|---|
LogouttabController | Implements redirect from logout tab. |