concrete/src/Entity/Statistics/UsageTracker/FileUsageRepository.php
public function findByFile($file)
    {
        if ($file instanceof File) {
            $file = $file->getFileID();
        }

        return $this->findBy([
            'file_id' => $file
        ]);
    }
public function findByFile($file)
    {
        if ($file instanceof File) {
            $file = $file->getFileID();
        }

        return $this->findBy([
            'file_id' => $file
        ]);
    }
public function findByFile ( $ file ) { if ( $ file instanceof File ) { $ file = $ file -> getFileID ( ) ; } return $ this -> findBy ( [ 'file_id' => $ file ] ) ; }
Find usage records related to a file
@param File|int $file The file object or the file id
@return FileUsageRecord[]
Find usage records related to a file