public function getDownloadCounter()
{
$downloadCounter = 0;
foreach ($this->getEntity()->getFiles() as $file) {
/** @var FileVersion $fileVersion */
foreach ($file->getFileVersions() as $fileVersion) {
$downloadCounter += intval($fileVersion->getDownloadCounter());
}
}
return $downloadCounter;
}