Documentation

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

clearInstancePool()

Clears the instance pool.

public static clearInstancePool() : void

get()

public static get(int $id) : static|null
Parameters
$id : int
Return values
static|null

getChildren()

public getChildren() : array<int, self>
Return values
array<int, self>

getCreateUser()

public getCreateUser() : string
Return values
string

getParent()

public getParent() : self|null
Return values
self|null

getParentTree()

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>

getPathAsArray()

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>

getUpdateUser()

public getUpdateUser() : string
Return values
string

inParentTree()

Checks if $anObj is in the parent tree of the object.

public inParentTree(self $anObj) : bool
Parameters
$anObj : self
Return values
bool

isParent()

public isParent(self $mediaCat) : bool
Parameters
$mediaCat : self
Return values
bool

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

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
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