public function fileDownload($file)
    {
        $response = new SymfonyResponse();

        $response->headers->set('Content-Disposition', 
            $response->headers->makeDisposition(
                ResponseHeaderBag::DISPOSITION_ATTACHMENT,
                $file
            )
        );

        return $response;
    }
public function fileDownload($file)
    {
        $response = new SymfonyResponse();

        $response->headers->set('Content-Disposition', 
            $response->headers->makeDisposition(
                ResponseHeaderBag::DISPOSITION_ATTACHMENT,
                $file
            )
        );

        return $response;
    }
public function fileDownload ( $ file ) { $ response = new SymfonyResponse ( ) ; $ response -> headers -> set ( 'Content-Disposition' , $ response -> headers -> makeDisposition ( ResponseHeaderBag :: DISPOSITION_ATTACHMENT , $ file ) ) ; return $ response ; }
Create a new file download response

@param string    $file  The file
Create a new file download response