Components \ commerce \ affiliates administrators commissions payments \ configuration paymentmethods \ shippingmethods \ methods delivery discounts \ products brands categories \ recurringsales storedcards \ sales items \ receipts allocations \ customers \ contacts passwords referrertypes \ relationships types \ groups contacts \ marketing \ emailmarketing \ sends contacts unsubscribers \ events attendees locations \ reminders \ automation eventremindertrigger \ settings administrators components configurationitems cpanel customfields \ developer scheduledtasks threads domains \ website \ analytics sessions comments \ designs generator media pages \ posts categories Framework \ architecture publicassets \ assets css javascript \ caching filebased \ components textualids \ data util \ database mainconnection date \ dom currentcontext renderer \ html converters highlighter javascript \ http redirection request session useragent \ i18n companytypes countries languages \ network cidr dns geoip random \ reflection api \ system filenames filesystem toasts
.
.
.
quick access
\ methods

\Components\Website\Media::

Class Methods

The following static methods are available on this class:
string configGetValue($strConfigId)
Description
Retrieves the value of a config item for the current component
Parameters
$strConfigId
string
Return
Config item value
void getChildren($strMediaPath, $bPrivate, $arrProperties)
Description
Returns all media underneath a folder
Parameters
$strMediaPath
string
$bPrivate
mixed
$arrProperties
mixed
Return
void
string getImageAtSize($strFile, $iWidth, $iHeight, $bMaintainAspect, $bSupportsHiDPI, $bAllowUpscale)
Description
Returns a URL of an image at the size supplied.

If $iWidth or $iHeight is not specified, a resize will occur only in the specified dimension.

When $bMaintainAspect is true, the image is restricted to the smaller dimension.

When $bSupportsHiDPI is true, an image will be served at the DPI of the current useragent. You are responsible for restricting the size of the image to the right screen dimensions. For instance, you might restrict it by setting width="" and height="" attributes on the <img> tag.

Source file name Width in pixels Height in pixels Whether or not to maintain aspect ratio. If set to 'crop' the image will be scaled and cropped. If true, and if we can determine the client is using a high DPI screen, then return an image with double the size. When true, allow creation of new image with dimensions larger than the natural image size.
Parameters
$strFile
string
$iWidth
int
$iHeight
int
$bMaintainAspect
bool
$bSupportsHiDPI
bool
$bAllowUpscale
bool
Return
URL

Database Fields

The following fields are used when retrieving and saving entities.