public function AutologoutManager::inactivityMessage in Automated Logout 8
Display the inactivity message if required when the user is logged out.
Overrides AutologoutManagerInterface::inactivityMessage
File
- src/
AutologoutManager.php, line 181
Class
- AutologoutManager
- Defines an AutologoutManager service.
Namespace
Drupal\autologoutCode
public function inactivityMessage() {
$message = Xss::filter($this->autoLogoutSettings
->get('inactivity_message'));
$type = $this->autoLogoutSettings
->get('inactivity_message_type');
if (!empty($message)) {
$this->messenger
->addMessage($this
->t('@message', [
'@message' => $message,
]), $type);
}
}