Config
extends PlatformUtility
in package
Provides access to template configuation, such as image thumbnail size presets.
Tags
Table of Contents
- get() : mixed|null
- Returns the value of the given $key in the template configuration.
- getThumbnailSizePresets() : array<string|int, mixed>
- Returns the thumbnail size presets from the template configuration.
Methods
get()
Returns the value of the given $key in the template configuration.
public
get(string $key[, mixed $fallback = null ]) :
mixed|null
If the key does not exists or is null, this function will return the provided default argument instead.
Parameters
- $key : string
- $fallback : mixed = null
Tags
Return values
mixed|null —getThumbnailSizePresets()
Returns the thumbnail size presets from the template configuration.
public
getThumbnailSizePresets() :
array<string|int, mixed>
Tags
Return values
array<string|int, mixed> —{ array { srcsetSizes: int[], presets: array { <named preset 1>: array { srcset: int[] }, ... } }