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
$id
protected
int
$id
$name
protected
string
$name
= ''
$originalname
protected
string
$originalname
= ''
$size
protected
int
$size
$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
clearInstanceListPool()
Clears the instance list pool.
public
static clearInstanceListPool() : void
clearInstancePool()
Clears the instance pool.
public
static clearInstancePool() : void
fileExists()
public
fileExists() : bool
Return values
boolforId()
public
static forId(int $mediaId) : static|null
Parameters
- $mediaId : int
Tags
Return values
static|nullget()
public
static get(string $name) : static|null
Parameters
- $name : string
Return values
static|nullgetCategory()
public
getCategory() : rex_media_category|null
Return values
rex_media_category|nullgetCategoryId()
public
getCategoryId() : int
Return values
intgetCreateDate()
public
getCreateDate() : int
Return values
intgetCreateUser()
public
getCreateUser() : string
Return values
stringgetDocTypes()
public
static getDocTypes() : array<int, string>
Return values
array<int, string>getExtension()
public
getExtension() : string
Return values
stringgetFileName()
public
getFileName() : string
Return values
stringgetFormattedSize()
public
getFormattedSize() : string
Return values
stringgetHeight()
public
getHeight() : int|null
Return values
int|nullgetId()
public
getId() : int
Return values
intgetImageTypes()
public
static getImageTypes() : array<int, string>
Return values
array<int, string>getOriginalFileName()
public
getOriginalFileName() : string
Return values
stringgetRootMedia()
public
static getRootMedia() : array<int, static>
Return values
array<int, static>getSize()
public
getSize() : int
Return values
intgetTitle()
public
getTitle() : string
Return values
stringgetType()
public
getType() : string
Return values
stringgetUpdateDate()
public
getUpdateDate() : int
Return values
intgetUpdateUser()
public
getUpdateUser() : string
Return values
stringgetUrl()
public
getUrl() : string
Return values
stringgetValue()
public
getValue(mixed $value) : string|int|null
Parameters
- $value : mixed
Return values
string|int|nullgetWidth()
public
getWidth() : int|null
Return values
int|nullhasValue()
public
hasValue(mixed $value) : bool
Parameters
- $value : mixed
Return values
boolisDocType()
public
static isDocType(mixed $type) : bool
Parameters
- $type : mixed
Return values
boolisImage()
public
isImage() : bool
Return values
boolisImageType()
public
static isImageType(mixed $extension) : bool
Parameters
- $extension : mixed
Return values
boolisPermitted()
Returns whether the element is permitted.
public
isPermitted() : bool
Return values
booltoImage()
public
toImage([array<string|int, mixed> $params = [] ]) : string
Parameters
- $params : array<string|int, mixed> = []
Return values
stringtoLink()
public
toLink([string $attributes = '' ]) : string
Parameters
- $attributes : string = ''
Return values
stringaddInstance()
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
Return values
static|nullgetInstanceList()
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
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
boolhasInstanceList()
Checks whether an instance list exists for the given key.
protected
static hasInstanceList(mixed $key) : bool
Parameters
- $key : mixed
-
Key