Thumbnail
class Thumbnail
Thumbnail Creation Class
Methods
Generate a Thumb for the passed file and returns the file path to the generated image
Evaluates the proper thumb doc of a document If the document index does not yet have a thumb_doc property, it is evaluated and saved.
Generates the url to a thumbnail of given proportions for a specific document index. Returns false if an error occurred.
Returns the MIME Type of the generated thumbs
Get Support File Types
Initialize Thumbnail Engine
Set Thumb Size
Details
at line 94
string
generate(mixed $source, $empty_thumb = true)
Generate a Thumb for the passed file and returns the file path to the generated image
at line 208
bool
generatePreviewsOfDocument(int|DocumentIndex $document_index, bool $force_new = false)
Evaluates the proper thumb doc of a document If the document index does not yet have a thumb_doc property, it is evaluated and saved.
The method ALWAYS returns either the filename that is to be ultimatly used for the thumbnail or false in case some kind of error occurred. Even though, the method internally saves reference ids should they be provided by the get_thumb_document of the document model. Returns false if an error occurred.
at line 275
string|false
get_document_thumbnail_url(DocumentIndex|int $document_index, int|bool $width = false, int|bool $height = false, bool $return_empty = true, bool $only_if_cached = true)
internal | param Reference $xmodel_system_document_index Document Index Model (If you have a reference from this to the original) |
Generates the url to a thumbnail of given proportions for a specific document index. Returns false if an error occurred.
at line 128
string
get_output_mime()
Returns the MIME Type of the generated thumbs
at line 363
array
get_supported_file_types($type = false)
Get Support File Types
at line 57
init()
Initialize Thumbnail Engine
at line 78
set_thumbsize(mixed $w = 100, mixed $h = 100)
Set Thumb Size