public function createFileName($file)
    {
        if ( ! is_null($this->elfinderFilePath) ) {
            return $this->getFileName();
        }
        if ( is_string($file) ) {
            return substr( strrchr( $file, '/' ), 1 );
        }

        $filename = $file->getClientOriginalName();
        $mime = $file->getClientOriginalExtension();
        $parts = explode('.',$filename);
        array_pop($parts);
        return str_slug( implode(' ', $parts), '-' ) . '_' . time() .  '.' . $mime;
    }
public function createFileName($file)
    {
        if ( ! is_null($this->elfinderFilePath) ) {
            return $this->getFileName();
        }
        if ( is_string($file) ) {
            return substr( strrchr( $file, '/' ), 1 );
        }

        $filename = $file->getClientOriginalName();
        $mime = $file->getClientOriginalExtension();
        $parts = explode('.',$filename);
        array_pop($parts);
        return str_slug( implode(' ', $parts), '-' ) . '_' . time() .  '.' . $mime;
    }
public function createFileName ( $ file ) { if ( ! is_null ( $ this -> elfinderFilePath ) ) { return $ this -> getFileName ( ) ; } if ( is_string ( $ file ) ) { return substr ( strrchr ( $ file , '/' ) , 1 ) ; } $ filename = $ file -> getClientOriginalName ( ) ; $ mime = $ file -> getClientOriginalExtension ( ) ; $ parts = explode ( '.' , $ filename ) ; array_pop ( $ parts ) ; return str_slug ( implode ( ' ' , $ parts ) , '-' ) . '_' . time ( ) . '.' . $ mime ; }
create file name

@param $file
@return string
create file name