src/GuillermoMartinez/Filemanager/Filemanager.php
public function firstThumb($file,$path){
        $fullpath = $this->getFullPath().$path;
        $fullpaththumb = $this->getFullPath().'/'.$this->config['folder_thumb'].$path;
        $filename = $file->getFilename();
        $filename_new_first = '';
        foreach ($this->config['images']['resize'] as $key => $value) {
            $image_info = $this->imageSizeName($path,$filename,$value);
            if(file_exists($fullpaththumb.$image_info['name']) === false){
                $this->resizeImage($fullpath.$filename,$fullpaththumb.$image_info['name'],$image_info,$value);
            }
            $filename_new_first = $image_info['name'];
            break;
        }
        return $filename_new_first;
    }
public function firstThumb($file,$path){
        $fullpath = $this->getFullPath().$path;
        $fullpaththumb = $this->getFullPath().'/'.$this->config['folder_thumb'].$path;
        $filename = $file->getFilename();
        $filename_new_first = '';
        foreach ($this->config['images']['resize'] as $key => $value) {
            $image_info = $this->imageSizeName($path,$filename,$value);
            if(file_exists($fullpaththumb.$image_info['name']) === false){
                $this->resizeImage($fullpath.$filename,$fullpaththumb.$image_info['name'],$image_info,$value);
            }
            $filename_new_first = $image_info['name'];
            break;
        }
        return $filename_new_first;
    }
public function firstThumb ( $ file , $ path ) { $ fullpath = $ this -> getFullPath ( ) . $ path ; $ fullpaththumb = $ this -> getFullPath ( ) . '/' . $ this -> config [ 'folder_thumb' ] . $ path ; $ filename = $ file -> getFilename ( ) ; $ filename_new_first = '' ; foreach ( $ this -> config [ 'images' ] [ 'resize' ] as $ key => $ value ) { $ image_info = $ this -> imageSizeName ( $ path , $ filename , $ value ) ; if ( file_exists ( $ fullpaththumb . $ image_info [ 'name' ] ) === false ) { $ this -> resizeImage ( $ fullpath . $ filename , $ fullpaththumb . $ image_info [ 'name' ] , $ image_info , $ value ) ; } $ filename_new_first = $ image_info [ 'name' ] ; break ; } return $ filename_new_first ; }
Informacion de la primera miniatura
@param  UploadedFile $file
@param  string $path ruta relativa
@return string
Informacion de la primera miniatura