Type
class Type (View source)
Entity representing a thumbnail type.
Constants
RESIZE_PROPORTIONAL |
Thumbnail sizing mode: proportional. |
RESIZE_EXACT |
Thumbnail sizing mode: exact dimensions. |
RESIZE_DEFAULT |
Default thumbnail sizing mode. |
HIGHDPI_SUFFIX |
Suffix for high DPI thumbnails (eg. Retina). |
Properties
protected int|null | $ftTypeID | The thumbnail unique identifier. |
|
protected string | $ftTypeHandle | The handle that identifies the thumbnail type. |
|
protected string | $ftTypeName | The name of the thumbnail type. |
|
protected int|null | $ftTypeWidth | The width of the thumbnails (or the maximum width in case of proportional sizing). |
|
protected int|null | $ftTypeHeight | The height of the thumbnails (or the maximum height in case of proportional sizing). |
|
protected bool | $ftTypeIsRequired | Is this thumbnail type required? If yes, it can't be deleted. |
|
protected string | $ftTypeSizingMode | The thumbnail sizing mode (one of the Type::RESIZE_... constants). |
|
protected bool | $ftLimitedToFileSets | Should the thumbnails be build for every file that ARE NOT in the file sets (false), or only for files that ARE in the specified file sets (true)? |
|
protected ArrayCollection|TypeFileSet[] | $ftAssociatedFileSets | Associated file sets (whose meaning depends on the value of ftLimitedToFileSets). |
Methods
No description
Get the thumbnail unique identifier.
Set the handle that identifies the thumbnail type.
Get the handle that identifies the thumbnail type.
Set the name of the thumbnail type.
Get the name of the thumbnail type.
Get the display name for this thumbnail type (localized and escaped accordingly to $format).
Set the width of the thumbnails (or the maximum width in case of proportional sizing).
Get the width of the thumbnails (or the maximum width in case of proportional sizing).
Set the height of the thumbnails (or the maximum height in case of proportional sizing).
Get the height of the thumbnails (or the maximum height in case of proportional sizing).
Mark this this thumbnail type as required (that is, it can't be deleted).
Is this thumbnail type required? If yes, it can't be deleted.
Set the thumbnail sizing mode.
Get the thumbnail sizing mode.
Get the display name of the thumbnail sizing mode.
Should the thumbnails be build for every file that ARE NOT in the file sets (false), or only for files that ARE in the specified file sets (true)?
Should the thumbnails be build for every file that ARE NOT in the file sets (false), or only for files that ARE in the specified file sets (true)?
Get the associated file sets (whose meaning depends on the value of ftLimitedToFileSets).
Save this instance to the database.
Delete this instance from the database.
Get a thumbnail type version instance representing this thumbnail type (normal-DPI).
Get a thumbnail type version instance representing this thumbnail type (high-DPI).
No description
Details
__construct()
No description
int|null
getID()
Get the thumbnail unique identifier.
setHandle(string $ftTypeHandle)
Set the handle that identifies the thumbnail type.
string
getHandle()
Get the handle that identifies the thumbnail type.
setName(string $ftTypeName)
Set the name of the thumbnail type.
string
getName()
Get the name of the thumbnail type.
string
getDisplayName(string $format = 'html')
Get the display name for this thumbnail type (localized and escaped accordingly to $format).
setWidth(int|null $ftTypeWidth)
Set the width of the thumbnails (or the maximum width in case of proportional sizing).
int|null
getWidth()
Get the width of the thumbnails (or the maximum width in case of proportional sizing).
setHeight(int|null $ftTypeHeight)
Set the height of the thumbnails (or the maximum height in case of proportional sizing).
int|null
getHeight()
Get the height of the thumbnails (or the maximum height in case of proportional sizing).
requireType()
Mark this this thumbnail type as required (that is, it can't be deleted).
bool
isRequired()
Is this thumbnail type required? If yes, it can't be deleted.
setSizingMode(string $ftTypeSizingMode = self::RESIZE_DEFAULT)
Set the thumbnail sizing mode.
string
getSizingMode()
Get the thumbnail sizing mode.
string
getSizingModeDisplayName()
Get the display name of the thumbnail sizing mode.
$this
setLimitedToFileSets(bool $value)
Should the thumbnails be build for every file that ARE NOT in the file sets (false), or only for files that ARE in the specified file sets (true)?
bool
isLimitedToFileSets()
Should the thumbnails be build for every file that ARE NOT in the file sets (false), or only for files that ARE in the specified file sets (true)?
ArrayCollection|TypeFileSet[]
getAssociatedFileSets()
Get the associated file sets (whose meaning depends on the value of ftLimitedToFileSets).
save()
Save this instance to the database.
delete()
Delete this instance from the database.
Version
getBaseVersion()
Get a thumbnail type version instance representing this thumbnail type (normal-DPI).
Version
getDoubledVersion()
Get a thumbnail type version instance representing this thumbnail type (high-DPI).
private Version
getVersion(bool $doubled)
No description