Documentation

rex_media
in package
Uses rex_instance_list_pool_trait, rex_instance_pool_trait

Object Oriented Framework: Bildet ein Medium des Medienpools ab.

Table of Contents

Properties

$category_id  : int
$createdate  : int
$createuser  : string
$height  : int|null
$id  : int
$name  : string
$originalname  : string
$size  : int
$title  : string
$type  : string
$updatedate  : int
$updateuser  : string
$width  : int|null

Methods

clearInstance()  : void
Removes the instance of the given key.
clearInstanceList()  : void
Clears the instance list of the given key.
clearInstanceListPool()  : void
Clears the instance list pool.
clearInstancePool()  : void
Clears the instance pool.
fileExists()  : bool
forId()  : static|null
get()  : static|null
getCategory()  : rex_media_category|null
getCategoryId()  : int
getCreateDate()  : int
getCreateUser()  : string
getDocTypes()  : array<int, string>
getExtension()  : string
getFileName()  : string
getFormattedSize()  : string
getHeight()  : int|null
getId()  : int
getImageTypes()  : array<int, string>
getOriginalFileName()  : string
getRootMedia()  : array<int, static>
getSize()  : int
getTitle()  : string
getType()  : string
getUpdateDate()  : int
getUpdateUser()  : string
getUrl()  : string
getValue()  : string|int|null
getWidth()  : int|null
hasValue()  : bool
isDocType()  : bool
isImage()  : bool
isImageType()  : bool
isPermitted()  : bool
Returns whether the element is permitted.
toImage()  : string
toLink()  : string
addInstance()  : void
Adds an instance.
addInstanceList()  : void
Adds an instance list.
getInstance()  : static|null
Returns the instance for the given key.
getInstanceList()  : array<string|int, mixed>
Returns the instance list for the given key.
hasInstance()  : bool
Checks whether an instance exists for the given key.
hasInstanceList()  : bool
Checks whether an instance list exists for the given key.

Properties

$category_id

protected int $category_id

$createdate

protected int $createdate

$createuser

protected string $createuser = ''

$height

protected int|null $height

$name

protected string $name = ''

$originalname

protected string $originalname = ''

$title

protected string $title = ''

$type

protected string $type = ''

$updatedate

protected int $updatedate

$updateuser

protected string $updateuser = ''

$width

protected int|null $width

Methods

clearInstance()

Removes the instance of the given key.

public static clearInstance(mixed $key) : void
Parameters
$key : mixed

Key

clearInstanceList()

Clears the instance list of the given key.

public static clearInstanceList(mixed $key) : void
Parameters
$key : mixed

Key

clearInstancePool()

Clears the instance pool.

public static clearInstancePool() : void

fileExists()

public fileExists() : bool
Return values
bool

forId()

public static forId(int $mediaId) : static|null
Parameters
$mediaId : int
Tags
throws
rex_sql_exception
Return values
static|null

get()

public static get(string $name) : static|null
Parameters
$name : string
Return values
static|null

getCategoryId()

public getCategoryId() : int
Return values
int

getCreateDate()

public getCreateDate() : int
Return values
int

getCreateUser()

public getCreateUser() : string
Return values
string

getDocTypes()

public static getDocTypes() : array<int, string>
Return values
array<int, string>

getExtension()

public getExtension() : string
Return values
string

getFileName()

public getFileName() : string
Return values
string

getFormattedSize()

public getFormattedSize() : string
Return values
string

getHeight()

public getHeight() : int|null
Return values
int|null

getId()

public getId() : int
Return values
int

getImageTypes()

public static getImageTypes() : array<int, string>
Return values
array<int, string>

getOriginalFileName()

public getOriginalFileName() : string
Return values
string

getRootMedia()

public static getRootMedia() : array<int, static>
Return values
array<int, static>

getSize()

public getSize() : int
Return values
int

getTitle()

public getTitle() : string
Return values
string

getType()

public getType() : string
Return values
string

getUpdateDate()

public getUpdateDate() : int
Return values
int

getUpdateUser()

public getUpdateUser() : string
Return values
string

getUrl()

public getUrl() : string
Return values
string

getValue()

public getValue(mixed $value) : string|int|null
Parameters
$value : mixed
Return values
string|int|null

getWidth()

public getWidth() : int|null
Return values
int|null

hasValue()

public hasValue(mixed $value) : bool
Parameters
$value : mixed
Return values
bool

isDocType()

public static isDocType(mixed $type) : bool
Parameters
$type : mixed
Return values
bool

isImage()

public isImage() : bool
Return values
bool

isImageType()

public static isImageType(mixed $extension) : bool
Parameters
$extension : mixed
Return values
bool

isPermitted()

Returns whether the element is permitted.

public isPermitted() : bool
Return values
bool

toImage()

public toImage([array<string|int, mixed> $params = [] ]) : string
Parameters
$params : array<string|int, mixed> = []
Return values
string
public toLink([string $attributes = '' ]) : string
Parameters
$attributes : string = ''
Return values
string

addInstance()

Adds an instance.

protected static addInstance(mixed $key, self $instance) : void
Parameters
$key : mixed

Key

$instance : self

Instance

addInstanceList()

Adds an instance list.

protected static addInstanceList(mixed $key, array<string|int, mixed> $instanceKeyList) : void
Parameters
$key : mixed

Key

$instanceKeyList : array<string|int, mixed>

Array of instance keys

getInstance()

Returns the instance for the given key.

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

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

Parameters
$key : mixed

Key

$createCallback : callable = null

Callback, will be called to create a new instance

Tags
psalm-param

callable(mixed...):?static $createCallback

Return values
static|null

getInstanceList()

Returns the instance list for the given key.

protected static getInstanceList(mixed $key, callable $getInstanceCallback[, callable|null $createListCallback = null ]) : array<string|int, mixed>

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

Parameters
$key : mixed

Key

$getInstanceCallback : callable

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

$createListCallback : callable|null = null

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

Tags
template

T as object

psalm-param

callable(mixed...):?T $getInstanceCallback

psalm-param

callable(mixed...):mixed[]|null $createListCallback

psalm-return

list<T>

Return values
array<string|int, mixed>

hasInstance()

Checks whether an instance exists for the given key.

protected static hasInstance(mixed $key) : bool
Parameters
$key : mixed

Key

Return values
bool

hasInstanceList()

Checks whether an instance list exists for the given key.

protected static hasInstanceList(mixed $key) : bool
Parameters
$key : mixed

Key

Return values
bool

        
On this page

Search results