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(int  $id) : static|null

Parameters

int $id

Returns

static|null —

getRootCategories()

getRootCategories() : self[]

Returns

self[] —

getId()

getId() : int

Returns

int —

getName()

getName() : string

Returns

string —

getPath()

getPath() : string

Returns

string —

getPathAsArray()

getPathAsArray() : \list<int>

Returns the path ids of the category as an array.

Returns

\list

getUpdateUser()

getUpdateUser() : string

Returns

string —

getUpdateDate()

getUpdateDate() : int

Returns

int —

getCreateUser()

getCreateUser() : string

Returns

string —

getCreateDate()

getCreateDate() : int

Returns

int —

getParentId()

getParentId() : int

Returns

int —

getParent()

getParent() : self|null

Returns

self|null —

getParentTree()

getParentTree() : self[]

Get an array of all parentCategories.

Returns an array of rex_media_category objects sorted by $priority.

Returns

self[] —

inParentTree()

inParentTree(self  $anObj) : bool

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

Parameters

self $anObj

Returns

bool —

getChildren()

getChildren() : self[]

Returns

self[] —

getMedia()

getMedia() : \rex_media[]

Returns

\rex_media[] —

isParent()

isParent(self  $mediaCat) : bool

Parameters

self $mediaCat

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 —

getChildCategories()

getChildCategories(int  $parentId) : self[]

Parameters

int $parentId

Returns

self[] —