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. |
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). |
Methods
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.
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).
Details
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.
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).