Properties

$id

$id

$category_id

$category_id

$name

$name

$originalname

$originalname

$type

$type

$size

$size

$width

$width

$height

$height

$title

$title

$updatedate

$updatedate

$createdate

$createdate

$updateuser

$updateuser

$createuser

$createuser

Methods

clearInstanceList()

clearInstanceList(mixed  $key) : mixed

Clears the instance list of the given key.

Parameters

mixed $key

Key

Returns

mixed —

clearInstanceListPool()

clearInstanceListPool() : mixed

Clears the instance list pool.

Returns

mixed —

clearInstance()

clearInstance(mixed  $key) : mixed

Removes the instance of the given key.

Parameters

mixed $key

Key

Returns

mixed —

clearInstancePool()

clearInstancePool() : mixed

Clears the instance pool.

Returns

mixed —

get()

get(string  $name) : null|static

Parameters

string $name

Returns

null|static —

forId()

forId(int  $mediaId) : null|static

Parameters

int $mediaId

Throws

\rex_sql_exception

Returns

null|static —

getRootMedia()

getRootMedia() : static[]

Returns

static[] —

getId()

getId() : int

Returns

int —

getCategory()

getCategory() : \rex_media_category|null

Returns

\rex_media_category|null —

getCategoryId()

getCategoryId() : int

Returns

int —

getTitle()

getTitle() : string

Returns

string —

getFileName()

getFileName() : string

Returns

string —

getOriginalFileName()

getOriginalFileName() : string

Returns

string —

getUrl()

getUrl() : string

Returns

string —

getWidth()

getWidth() : int

Returns

int —

getHeight()

getHeight() : int

Returns

int —

getType()

getType() : string

Returns

string —

getSize()

getSize() : int

Returns

int —

getFormattedSize()

getFormattedSize() : string

Returns

string —

getUpdateUser()

getUpdateUser() : string

Returns

string —

getUpdateDate()

getUpdateDate() : int

Returns

int —

getCreateUser()

getCreateUser() : string

Returns

string —

getCreateDate()

getCreateDate() : int

Returns

int —

toImage()

toImage(array  $params = []) : string

Parameters

array $params

Returns

string —

toLink()

toLink(string  $attributes = '') : string

Parameters

string $attributes

Returns

string —

isImage()

isImage() : bool

Returns

bool —

getExtension()

getExtension() : string

Returns

string —

fileExists()

fileExists() : bool

Returns

bool —

getDocTypes()

getDocTypes() : mixed

Returns

mixed —

isDocType()

isDocType(mixed  $type) : bool

Parameters

mixed $type

Returns

bool —

getImageTypes()

getImageTypes() : mixed

Returns

mixed —

isImageType()

isImageType(mixed  $extension) : bool

Parameters

mixed $extension

Returns

bool —

hasValue()

hasValue(mixed  $value) : bool

Parameters

mixed $value

Returns

bool —

getValue()

getValue(mixed  $value) : mixed

Parameters

mixed $value

Returns

mixed —

isPermitted()

isPermitted() : bool

Returns whether the element is permitted.

Returns

bool —

addInstanceList()

addInstanceList(mixed  $key, array  $instanceKeyList) : mixed

Adds an instance list.

Parameters

mixed $key

Key

array $instanceKeyList

Array of instance keys

Returns

mixed —

hasInstanceList()

hasInstanceList(mixed  $key) : bool

Checks whether an instance list exists for the given key.

Parameters

mixed $key

Key

Returns

bool —

getInstanceList()

getInstanceList(mixed  $key, callable  $getInstanceCallback, callable|null  $createListCallback = null) : array

Returns the instance list for the given key.

If the instance list does not exist it will be created by calling the $createListCallback

Parameters

mixed $key

Key

callable $getInstanceCallback

Callback, will be called for every list item to get the instance

callable|null $createListCallback

Callback, will be called to create the list of instance keys

Returns

array —

addInstance()

addInstance(mixed  $key, self  $instance) : mixed

Adds an instance.

Parameters

mixed $key

Key

self $instance

Instance

Returns

mixed —

hasInstance()

hasInstance(mixed  $key) : bool

Checks whether an instance exists for the given key.

Parameters

mixed $key

Key

Returns

bool —

getInstance()

getInstance(mixed  $key, callable  $createCallback = null) : null|static

Returns the instance for the given key.

If the instance does not exist it will be created by calling the $createCallback

Parameters

mixed $key

Key

callable $createCallback

Callback, will be called to create a new instance

Returns

null|static —