You are here

public function FileResponseSubscriber::__construct in Commerce File 8.2

Constructs a new FileResponseSubscriber.

Parameters

\Drupal\Core\Session\AccountInterface $current_user: The current user.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: The entity type manager.

\Drupal\commerce_file\DownloadLoggerInterface $download_logger: The download logger.

\Drupal\commerce_file\LicenseFileManagerInterface $license_file_manager: The license file manager.

File

src/EventSubscriber/FileResponseSubscriber.php, line 58

Class

FileResponseSubscriber
A subscriber to log downloads of licensed files.

Namespace

Drupal\commerce_file\EventSubscriber

Code

public function __construct(AccountInterface $current_user, EntityTypeManagerInterface $entity_type_manager, DownloadLoggerInterface $download_logger, LicenseFileManagerInterface $license_file_manager) {
  $this->currentUser = $current_user;
  $this->entityTypeManager = $entity_type_manager;
  $this->downloadLogger = $download_logger;
  $this->licenseFileManager = $license_file_manager;
}