You are here

public function CleanerSessionClearEventSubscriber::__construct in Cleaner 8.2

CleanerSessionClearEventSubscriber constructor.

Parameters

\Drupal\Core\Database\Connection $database: Database connection.

\Drupal\Core\Config\ConfigFactoryInterface $config_factory: Config factory.

\Drupal\Core\Logger\LoggerChannelFactoryInterface $logger_channel_factory: Logger channel factory.

\Drupal\Component\Datetime\TimeInterface $time: Date time service.

File

src/EventSubscriber/CleanerSessionClearEventSubscriber.php, line 66

Class

CleanerSessionClearEventSubscriber
Class CleanerSessionClearEventSubscriber.

Namespace

Drupal\cleaner\EventSubscriber

Code

public function __construct(Connection $database, ConfigFactoryInterface $config_factory, LoggerChannelFactoryInterface $logger_channel_factory, TimeInterface $time) {
  $this->database = $database;
  $this->config = $config_factory
    ->get('cleaner.settings');
  $this->loggerChannel = $logger_channel_factory
    ->get('cleaner');
  $this->requestTime = $time
    ->getRequestTime();
}