Documentation

rex_media_category_service
in package

Table of Contents

Methods

addCategory()  : string
categoryIsInUse()  : bool|string
deleteCategory()  : string
editCategory()  : string

Methods

addCategory()

public static addCategory(string $name, rex_media_category|null $parent) : string
Parameters
$name : string

The name of the new category

$parent : rex_media_category|null

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

Return values
string

A success message

categoryIsInUse()

public static categoryIsInUse(int $categoryId) : bool|string
Parameters
$categoryId : int
Return values
bool|string

false|warning-Message

editCategory()

public static editCategory(int $categoryId, array<string|int, mixed> $data) : string
Parameters
$categoryId : int

The id of the category to edit

$data : array<string|int, mixed>

The category data

Return values
string

A success message


        
On this page

Search results