Config
extends PlatformUtility
in package
Provides access to template configuration, 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>|null
- 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>|null
The srcset_sizes value is dynamically computed from all preset srcset
arrays rather than read from the config file.