CKFinder 3 – PHP Connector Documentation
ThumbnailRepository Class Reference

Public Member Functions

 __construct (CKFinder $app)
 
 getThumbnailBackend ()
 
 getContainer ()
 
 getThumbnailsPath ()
 
 getAllowedSizes ()
 
 isBitmapSupportEnabled ()
 
 getThumbnail (ResourceType $resourceType, string $path, string $fileName, int $requestedWidth, int $requestedHeight)
 
 deleteThumbnails (ResourceType $resourceType, string $path, string $fileName=null)
 

Protected Attributes

 $app
 
 $config
 
 $thumbsBackend
 
 $dispatcher
 

Detailed Description

The ThumbnailRepository class.

A class responsible for thumbnail management.

Constructor & Destructor Documentation

◆ __construct()

__construct ( CKFinder  $app)

Constructor.

Member Function Documentation

◆ deleteThumbnails()

deleteThumbnails ( ResourceType  $resourceType,
string  $path,
string  $fileName = null 
)

Deletes all thumbnails under the given path defined by the resource type, path and file name.

Returns
bool true if deleted successfully
Exceptions
FilesystemException

◆ getAllowedSizes()

getAllowedSizes ( )

Returns an array of allowed sizes for thumbnails.

Returns
array

◆ getContainer()

getContainer ( )
Returns
CKFinder

◆ getThumbnail()

getThumbnail ( ResourceType  $resourceType,
string  $path,
string  $fileName,
int  $requestedWidth,
int  $requestedHeight 
)

Returns a thumbnail object for a given file defined by the resource type, path and file name. The real size of the thumbnail image will be adjusted to one of the sizes allowed by the thumbnail configuration.

Parameters
ResourceType$resourceTypesource file resource type
string$pathsource file directory path
string$fileNamesource file name
int$requestedWidthrequested thumbnail height
int$requestedHeightrequested thumbnail height
Exceptions

Exception

◆ getThumbnailBackend()

getThumbnailBackend ( )

Returns the Backend object where thumbnails are stored.

Returns
Backend

◆ getThumbnailsPath()

getThumbnailsPath ( )

Returns backend-relative directory path where thumbnails are stored.

Returns
string

◆ isBitmapSupportEnabled()

isBitmapSupportEnabled ( )

Returns information about bitmap support for thumbnails. If bitmap support is disabled, thumbnails for bitmaps will not be generated.

Returns
bool true if bitmap support is enabled

Member Data Documentation

◆ $dispatcher

$dispatcher
protected

Event dispatcher.


The documentation for this class was generated from the following file: