rex_media_category
in package
Uses
rex_instance_list_pool_trait, rex_instance_pool_trait
Object Oriented Framework: Bildet eine Kategorie im Medienpool ab.
Table of Contents
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.
- get() : static|null
- getChildren() : array<int, self>
- getCreateDate() : int
- getCreateUser() : string
- getId() : int
- getMedia() : array<int, rex_media>
- getName() : string
- getParent() : self|null
- getParentId() : int
- getParentTree() : array<int, self>
- Get an array of all parentCategories.
- getPath() : string
- getPathAsArray() : array<int, int>
- Returns the path ids of the category as an array.
- getRootCategories() : array<int, self>
- getUpdateDate() : int
- getUpdateUser() : string
- inParentTree() : bool
- Checks if $anObj is in the parent tree of the object.
- isParent() : bool
- addInstance() : void
- Adds an instance.
- addInstanceList() : void
- Adds an instance list.
- getChildCategories() : array<int, self>
- 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.
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
get()
public
static get(int $id) : static|null
Parameters
- $id : int
Return values
static|nullgetChildren()
public
getChildren() : array<int, self>
Return values
array<int, self>getCreateDate()
public
getCreateDate() : int
Return values
intgetCreateUser()
public
getCreateUser() : string
Return values
stringgetId()
public
getId() : int
Return values
intgetMedia()
public
getMedia() : array<int, rex_media>
Return values
array<int, rex_media>getName()
public
getName() : string
Return values
stringgetParent()
public
getParent() : self|null
Return values
self|nullgetParentId()
public
getParentId() : int
Return values
intgetParentTree()
Get an array of all parentCategories.
public
getParentTree() : array<int, self>
Returns an array of rex_media_category objects sorted by $priority.
Return values
array<int, self>getPath()
public
getPath() : string
Return values
stringgetPathAsArray()
Returns the path ids of the category as an array.
public
getPathAsArray() : array<int, int>
Return values
array<int, int>getRootCategories()
public
static getRootCategories() : array<int, self>
Return values
array<int, self>getUpdateDate()
public
getUpdateDate() : int
Return values
intgetUpdateUser()
public
getUpdateUser() : string
Return values
stringinParentTree()
Checks if $anObj is in the parent tree of the object.
public
inParentTree(self $anObj) : bool
Parameters
- $anObj : self
Return values
boolisParent()
public
isParent(self $mediaCat) : bool
Parameters
- $mediaCat : self
Return values
booladdInstance()
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
getChildCategories()
protected
static getChildCategories(int $parentId) : array<int, self>
Parameters
- $parentId : int
Return values
array<int, self>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