Ojs\JournalBundle\Entity\IssueFile::getFile PHP Метод

getFile() публичный Метод

Get file
public getFile ( ) : string
Результат string
    public function getFile()
    {
        return $this->file;
    }

Usage Example

Пример #1
0
 public function issueFileAction(IssueFile $issueFile)
 {
     $fileManager = $this->get('jb_fileuploader.file_history.manager');
     $rootDir = $this->getParameter('kernel.root_dir');
     $assetHelper = $this->get('templating.helper.assets');
     $fileHistory = $fileManager->findOneByFileName($issueFile->getFile());
     $path = $rootDir . '/../web' . $fileManager->getUrl($fileHistory);
     $path = preg_replace('/\\?' . $assetHelper->getVersion() . '$/', '', $path);
     $response = new BinaryFileResponse($path);
     $response->setContentDisposition(ResponseHeaderBag::DISPOSITION_INLINE, preg_replace('/[[:^print:]]/', '_', $fileHistory->getOriginalName()));
     $event = new DownloadIssueFileEvent($issueFile);
     $dispatcher = $this->get('event_dispatcher');
     $dispatcher->dispatch(SiteEvents::DOWNLOAD_ISSUE_FILE, $event);
     return $response;
 }