\rex_media_category_service

Summary

Methods
Properties
Constants
addCategory()
deleteCategory()
categoryIsInUse()
editCategory()
No public properties found
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

addCategory()

addCategory(string  $name, \rex_media_category|null  $parent) : string

Parameters

string $name

The name of the new category

\rex_media_category|null $parent

The category in which the new category should be created, or null for a top/root level category

Returns

string —

A success message

deleteCategory()

deleteCategory(int  $categoryId) : string

Parameters

int $categoryId

Throws

\rex_functional_exception

Returns

string —

A success message

categoryIsInUse()

categoryIsInUse(int  $categoryId) : bool|string

Parameters

int $categoryId

Returns

bool|string —

false|warning-Message

editCategory()

editCategory(int  $categoryId, array  $data) : string

Parameters

int $categoryId

The id of the category to edit

array $data

The category data

Returns

string —

A success message