public function downloadFile(FileInterface $file)
    {
        /**
         * @var string $content
         */
        $content = $this
            ->filesystem
            ->read($this
                ->fileIdentifierTransformer
                ->transform($file)
            );

        $file->setContent($content);

        return $file;
    }
public function downloadFile(FileInterface $file)
    {
        /**
         * @var string $content
         */
        $content = $this
            ->filesystem
            ->read($this
                ->fileIdentifierTransformer
                ->transform($file)
            );

        $file->setContent($content);

        return $file;
    }
public function downloadFile ( FileInterface $ file ) { /**
         * @var string $content
         */ $ content = $ this -> filesystem -> read ( $ this -> fileIdentifierTransformer -> transform ( $ file ) ) ; $ file -> setContent ( $ content ) ; return $ file ; }
Given a Doctrine mapped File instance, retrieves its data and fill
content local variable with it.

@param FileInterface $file File to download

@return FileInterface File downloaded
Given a Doctrine mapped File instance retrieves its data and fill content local variable with it .