protected function setFileName($file)
    {
        if (isset($this->options['thumbnails'])) {
            $thumbs = isset($this->options['changeThumb'])
                ? $this->options['thumbnails'][$this->options['changeThumb']]
                : $this->options['thumbnails'];
            $thumbs = array_values($thumbs);
            $firstThumb = array_shift($thumbs);
            if (isset($firstThumb['name'])) {
                $this->fileName = str_replace(':time',time(),$firstThumb['name']);
                return;
            }
        }
        $this->fileName = $this->createFileName($file);
    }
protected function setFileName($file)
    {
        if (isset($this->options['thumbnails'])) {
            $thumbs = isset($this->options['changeThumb'])
                ? $this->options['thumbnails'][$this->options['changeThumb']]
                : $this->options['thumbnails'];
            $thumbs = array_values($thumbs);
            $firstThumb = array_shift($thumbs);
            if (isset($firstThumb['name'])) {
                $this->fileName = str_replace(':time',time(),$firstThumb['name']);
                return;
            }
        }
        $this->fileName = $this->createFileName($file);
    }
protected function setFileName ( $ file ) { if ( isset ( $ this -> options [ 'thumbnails' ] ) ) { $ thumbs = isset ( $ this -> options [ 'changeThumb' ] ) ? $ this -> options [ 'thumbnails' ] [ $ this -> options [ 'changeThumb' ] ] : $ this -> options [ 'thumbnails' ] ; $ thumbs = array_values ( $ thumbs ) ; $ firstThumb = array_shift ( $ thumbs ) ; if ( isset ( $ firstThumb [ 'name' ] ) ) { $ this -> fileName = str_replace ( ':time' , time ( ) , $ firstThumb [ 'name' ] ) ; return ; } } $ this -> fileName = $ this -> createFileName ( $ file ) ; }
set file name

@param \Symfony\Component\HttpFoundation\File\UploadedFile|string $file
@return void
set file name