concrete/src/Entity/File/Version.php
public function getThumbnails()
    {
        $thumbnails = [];
        $imageWidth = (int) $this->getAttribute('width');
        $imageHeight = (int) $this->getAttribute('height');
        if ($imageWidth < 1 || $imageHeight < 1) {
            throw new InvalidDimensionException($this->getFile(), $this, t('Invalid dimensions.'));
        }
        $types = ThumbnailType::getVersionList();
        $file = $this->getFile();
        foreach ($types as $type) {
            if ($type->shouldExistFor($imageWidth, $imageHeight, $file)) {
                $thumbnailPath = $type->getFilePath($this);
                $location = $file->getFileStorageLocationObject();
                $configuration = $location->getConfigurationObject();
                $filesystem = $location->getFileSystemObject();
                if ($filesystem->has($thumbnailPath)) {
                    $thumbnails[] = new Thumbnail($type, $configuration->getPublicURLToFile($thumbnailPath));
                }
            }
        }

        return $thumbnails;
    }
public function getThumbnails()
    {
        $thumbnails = [];
        $imageWidth = (int) $this->getAttribute('width');
        $imageHeight = (int) $this->getAttribute('height');
        if ($imageWidth < 1 || $imageHeight < 1) {
            throw new InvalidDimensionException($this->getFile(), $this, t('Invalid dimensions.'));
        }
        $types = ThumbnailType::getVersionList();
        $file = $this->getFile();
        foreach ($types as $type) {
            if ($type->shouldExistFor($imageWidth, $imageHeight, $file)) {
                $thumbnailPath = $type->getFilePath($this);
                $location = $file->getFileStorageLocationObject();
                $configuration = $location->getConfigurationObject();
                $filesystem = $location->getFileSystemObject();
                if ($filesystem->has($thumbnailPath)) {
                    $thumbnails[] = new Thumbnail($type, $configuration->getPublicURLToFile($thumbnailPath));
                }
            }
        }

        return $thumbnails;
    }
public function getThumbnails ( ) { $ thumbnails = [ ] ; $ imageWidth = ( int ) $ this -> getAttribute ( 'width' ) ; $ imageHeight = ( int ) $ this -> getAttribute ( 'height' ) ; if ( $ imageWidth < 1 || $ imageHeight < 1 ) { throw new InvalidDimensionException ( $ this -> getFile ( ) , $ this , t ( 'Invalid dimensions.' ) ) ; } $ types = ThumbnailType :: getVersionList ( ) ; $ file = $ this -> getFile ( ) ; foreach ( $ types as $ type ) { if ( $ type -> shouldExistFor ( $ imageWidth , $ imageHeight , $ file ) ) { $ thumbnailPath = $ type -> getFilePath ( $ this ) ; $ location = $ file -> getFileStorageLocationObject ( ) ; $ configuration = $ location -> getConfigurationObject ( ) ; $ filesystem = $ location -> getFileSystemObject ( ) ; if ( $ filesystem -> has ( $ thumbnailPath ) ) { $ thumbnails [ ] = new Thumbnail ( $ type , $ configuration -> getPublicURLToFile ( $ thumbnailPath ) ) ; } } } return $ thumbnails ; }
Get the list of all the thumbnails.

@throws \Concrete\Core\File\Exception\InvalidDimensionException

@return \Concrete\Core\File\Image\Thumbnail\Thumbnail[]
Get the list of all the thumbnails .