public function DownloadLoggerInterface::getDownloadCounts in Commerce File 8.2
Gets the download counts for the given license and its files.
Note that the download counts are returned for the license owner since we we only record downloads from the license owner.
Parameters
\Drupal\commerce_license\Entity\LicenseInterface $license: The license.
Return value
array The download counts, keyed by fid.
Throws
\InvalidArgumentException Thrown when the given license references a purchased entity that does not reference any file.
1 method overrides DownloadLoggerInterface::getDownloadCounts()
- DownloadLogger::getDownloadCounts in src/
DownloadLogger.php - Gets the download counts for the given license and its files.
File
- src/
DownloadLoggerInterface.php, line 37
Class
- DownloadLoggerInterface
- Interface for the download logger, responsible for logging file downloads.
Namespace
Drupal\commerce_fileCode
public function getDownloadCounts(LicenseInterface $license);