SilverStripe\AssetAdmin\Model\ThumbnailGenerator
Generate thumbnails and thumbnail links
Synopsis
class ThumbnailGenerator
{
- // constants
- const INLINE = 'inline';
- const URL = 'url';
- // members
- protected bool $generates = true;
- private static integer $max_thumbnail_bytes = 200000;
- private static array $thumbnail_links = ;
- private static string $method = 'FitMax';
- // methods
- public string|null generateThumbnailLink()
- public AssetContainer|DBFile|File generateThumbnail()
- public string generateLink()
- public bool getGenerates()
- public $this setGenerates()
Hierarchy
Uses
- SilverStripe\Core\Config\Configurable
Constants
Name | Value |
---|---|
INLINE | 'inline' |
URL | 'url' |
Members
private
- $max_thumbnail_bytes
—
int
Safely limit max inline thumbnail size to 200kb. - $method — string
- $thumbnail_links
—
array
Determine how thumbnails are serialised List of visibility to either 'inline' or 'url' form.
protected
- $generates
—
SilverStripe\AssetAdmin\Model\bool
Set to false to not generate
Methods
public
- generateLink() — Generate "src" property for this thumbnail.
- generateThumbnail() — Generate thumbnail object
- generateThumbnailLink() — Generate thumbnail and return the "src" property for this thumbnail
- getGenerates()
- setGenerates()