public function AutologoutManager::__construct in Automated Logout 8
Constructs an AutologoutManager object.
Parameters
\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.
\Drupal\Core\Config\ConfigFactoryInterface $config_factory: The config factory.
\Drupal\Core\Messenger\MessengerInterface $messenger: The messenger service.
\Drupal\Core\Session\AccountInterface $current_user: Data of the user.
\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger: Logger service.
\Drupal\Core\Session\SessionManager $sessionManager: The session.
\Drupal\user\UserData $userData: Data of the user.
\Drupal\Component\Datetime\TimeInterface $time: The time service.
\Drupal\Core\Entity\EntityTypeManagerInterface $entityTypeManager: The entity type manager service.
\Drupal\Core\StringTranslation\TranslationInterface $stringTranslation: The string translation service.
File
- src/
AutologoutManager.php, line 127
Class
- AutologoutManager
- Defines an AutologoutManager service.
Namespace
Drupal\autologoutCode
public function __construct(ModuleHandlerInterface $module_handler, ConfigFactoryInterface $config_factory, MessengerInterface $messenger, AccountInterface $current_user, LoggerChannelFactoryInterface $logger, SessionManager $sessionManager, UserData $userData, TimeInterface $time, EntityTypeManagerInterface $entityTypeManager, TranslationInterface $stringTranslation) {
$this->moduleHandler = $module_handler;
$this->autoLogoutSettings = $config_factory
->get('autologout.settings');
$this->configFactory = $config_factory;
$this->messenger = $messenger;
$this->currentUser = $current_user;
$this->logger = $logger
->get('autologout');
$this->session = $sessionManager;
$this->userData = $userData;
$this->time = $time;
$this->entityTypeManager = $entityTypeManager;
$this->stringTranslation = $stringTranslation;
}