Documentation

MediaTrait

Trait MediaTrait

Table of Contents

Properties

$_loadMedia  : bool
$media  : MediaCollectionInterface|null

Methods

getMedia()  : MediaCollectionInterface|Media
Gets the associated media collection.
getMediaFolder()  : string|null
Get filesystem path to the associated media.
getMediaOrder()  : array<string|int, mixed>
Get display order for the associated media.
getMediaUri()  : string|null
Get URI ot the associated media. Method will return null if path isn't URI.
clearMediaCache()  : void
Clear media cache.
freeMedia()  : void
getCacheKey()  : string
getMediaCache()  : CacheInterface
setMedia()  : $this
Sets the associated media collection.

Properties

Methods

getMediaFolder()

Get filesystem path to the associated media.

public abstract getMediaFolder() : string|null
Return values
string|null

getMediaOrder()

Get display order for the associated media.

public getMediaOrder() : array<string|int, mixed>
Return values
array<string|int, mixed>

Empty array means default ordering.

getMediaUri()

Get URI ot the associated media. Method will return null if path isn't URI.

public getMediaUri() : string|null
Return values
string|null

clearMediaCache()

Clear media cache.

protected clearMediaCache() : void

getCacheKey()

protected abstract getCacheKey() : string
Return values
string

getMediaCache()

protected getMediaCache() : CacheInterface
Return values
CacheInterface

        
On this page

Search results