BasicThumbnailer
class BasicThumbnailer implements ThumbnailerInterface, ApplicationAwareInterface (View source)
Traits
Trait ApplicationAwareTrait A trait used with ApplicationAwareInterface
Properties
| protected Application | $app | from ApplicationAwareTrait | |
| protected int|null | $jpegCompression | The currently configured JPEG compression level.  | 
                |
| protected int|null | $webpCompression | The currently configured WEBP compression level.  | 
                |
| protected int|null | $pngCompression | The currently configured PNG compression level.  | 
                |
| protected string|null | $thumbnailsFormat | The currently configured format of the generated thumbnails.  | 
                |
| private StorageLocationInterface | $storageLocation | 
Methods
Get the storage location to use.
Set the storage location to use. Note that the $savePath is going to be relative to this location.
Overrides the default JPEG compression level per instance of the image helper.
Get the currently set JPEG compression level.
Overrides the default WEBP compression level per instance of the image helper.
Get the currently set WEBP compression level.
Overrides the default PNG compression level per instance of the image helper.
Get the currently set PNG compression level.
Set the format of the generated thumbnails.
Get the format of the generated thumbnails.
Create a thumbnail given an image (or a path to an image).
Checks thumbnail resolver for filename, schedule for creation via ajax if necessary.
Checks filesystem for thumbnail and if file doesn't exist will create it immediately.
No description
Returns a path to the specified item, resized and/or cropped to meet max width and height. $obj can e Returns an object with the following properties: src, width, height.
No description
Details
        
                            
    setApplication(Application $app)
        
    
    Setter method for the application
        
                            
    __construct(StorageLocationInterface $storageLocation = null)
        
    
    No description
        
                            StorageLocationInterface
    getStorageLocation()
        
    
    Get the storage location to use.
        
                            ThumbnailerInterface
    setStorageLocation(StorageLocationInterface $storageLocation)
        
    
    Set the storage location to use. Note that the $savePath is going to be relative to this location.
        
                            ThumbnailerInterface
    setJpegCompression(int $level)
        
    
    Overrides the default JPEG compression level per instance of the image helper.
This allows for a single-use for a particularly low or high compression value.
        
                            int
    getJpegCompression()
        
    
    Get the currently set JPEG compression level.
        
                            ThumbnailerInterface
    setWebpCompression(int $level)
        
    
    Overrides the default WEBP compression level per instance of the image helper.
This allows for a single-use for a particularly low or high compression value.
        
                            int
    getWebpCompression()
        
    
    Get the currently set WEBP compression level.
        
                            ThumbnailerInterface
    setPngCompression(int $level)
        
    
    Overrides the default PNG compression level per instance of the image helper.
This allows for a single-use for a particularly low or high compression value.
        
                            int
    getPngCompression()
        
    
    Get the currently set PNG compression level.
        
                            ThumbnailerInterface
    setThumbnailsFormat(string $thumbnailsFormat)
        
    
    Set the format of the generated thumbnails.
        
                            string
    getThumbnailsFormat()
        
    
    Get the format of the generated thumbnails.
        
                            
    create($mixed, string $savePath, int|null $width, int|null $height, bool $fit = false, $format = false)
        
    
    Create a thumbnail given an image (or a path to an image).
        
                        private    stdClass
    returnThumbnailObjectFromResolver(File|string $obj, int|null $maxWidth, int|null $maxHeight, bool $crop = false)
        
    
    Checks thumbnail resolver for filename, schedule for creation via ajax if necessary.
        
                        private    stdClass
    checkForThumbnailAndCreateIfNecessary(File|string $obj, int|null $maxWidth, int|null $maxHeight, bool $crop = false)
        
    
    Checks filesystem for thumbnail and if file doesn't exist will create it immediately.
concrete5's default behavior from the beginning up to 8.1.
        
                            stdClass
    processThumbnail(bool $async, File|string $obj, int|null $maxWidth, int|null $maxHeight, bool $crop)
        
    
    No description
        
                            stdClass
    getThumbnail(File|string $obj, int|null $maxWidth, int|null $maxHeight, bool $crop = false)
        
    
    Returns a path to the specified item, resized and/or cropped to meet max width and height. $obj can e Returns an object with the following properties: src, width, height.
        
                            
    outputThumbnail($mixed, $maxWidth, $maxHeight, $alt = null, $return = false, $crop = false)
        deprecated
    
    deprecated
No description