ThumbnailGenerator
class ThumbnailGenerator (View source)
Generate thumbnails and thumbnail links
Traits
Provides extensions to this object to integrate it with standard config API methods.
Constants
| INLINE | 
                     Thumbnails are inline  | 
            
| URL | 
                     Thumbnails are linked by url  | 
            
Config options
| max_thumbnail_bytes | int | Safely limit max inline thumbnail size to 200kb.  | 
                |
| thumbnail_links | array | Determine how thumbnails are serialised List of visibility to either 'inline' or 'url' form.  | 
                |
| method | string | 
Properties
| protected | bool | $generates | Set to false to not generate  | 
                
Methods
Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
Gets the uninherited value for the given config option
Generate thumbnail and return the "src" property for this thumbnail
Details
        
                static            Config_ForClass
    config()
        
    
    Get a configuration accessor for this class. Short hand for Config::inst()->get($this->class, .....).
        
                            mixed
    uninherited(string $name)
        
    
    Gets the uninherited value for the given config option
        
                            string|null
    generateThumbnailLink(AssetContainer $file, int $width, int $height, bool $graceful = false)
        
    
    Generate thumbnail and return the "src" property for this thumbnail
        
                            AssetContainer|DBFile|File
    generateThumbnail(AssetContainer $file, int $width, int $height)
        
    
    Generate thumbnail object
        
                            string
    generateLink(AssetContainer $thumbnail = null)
        
    
    Generate "src" property for this thumbnail.
This can be either a url or base64 encoded data
        
                            bool
    getGenerates()
        
    
    No description
        
                            $this
    setGenerates(bool $generates)
        
    
    No description