src/Sulu/Bundle/MediaBundle/Controller/MediaStreamController.php
private function cleanUpFileName($fileName, $locale, $extension)
    {
        $pathInfo = pathinfo($fileName);
        $cleanedFileName = $this->get('sulu.content.path_cleaner')->cleanup($pathInfo['filename'], $locale);
        if ($extension) {
            $cleanedFileName .= '.' . $extension;
        }

        return $cleanedFileName;
    }
private function cleanUpFileName($fileName, $locale, $extension)
    {
        $pathInfo = pathinfo($fileName);
        $cleanedFileName = $this->get('sulu.content.path_cleaner')->cleanup($pathInfo['filename'], $locale);
        if ($extension) {
            $cleanedFileName .= '.' . $extension;
        }

        return $cleanedFileName;
    }
private function cleanUpFileName ( $ fileName , $ locale , $ extension ) { $ pathInfo = pathinfo ( $ fileName ) ; $ cleanedFileName = $ this -> get ( 'sulu.content.path_cleaner' ) -> cleanup ( $ pathInfo [ 'filename' ] , $ locale ) ; if ( $ extension ) { $ cleanedFileName .= '.' . $ extension ; } return $ cleanedFileName ; }
Cleaned up filename.

@param string $fileName
@param string $locale
@param string $extension

@return string
Cleaned up filename .