CategoryService
extends AirlayService
in package
Class AirlayService
Table of Contents
- $ : AirlayConfig
- $collection : CategoriesCollection
- $rabbitmq : AMQPStreamConnection
- $user : UserEntity
- $collection : mixed
- __construct() : mixed
- copy() : void
- create() : Category
- delete() : bool
- deleteFromDataSetDefaultCategories() : void
- download() : TmpFile
- getCollection() : mixed
- getDefaultCategories() : array<string|int, Category>
- update() : Category
- upload() : void
- validateChildrenCategory() : void
Properties
$
public
AirlayConfig
$
config
$collection
public
CategoriesCollection
$collection
$rabbitmq
public
AMQPStreamConnection
$rabbitmq
$user
public
UserEntity
$user
$collection
protected
mixed
$collection
Methods
__construct()
public
__construct(mixed $collection) : mixed
Parameters
- $collection : mixed
Return values
mixed —copy()
public
copy(ObjectId $id, ObjectId $organizationId) : void
Parameters
- $id : ObjectId
- $organizationId : ObjectId
Return values
void —create()
public
create(array<string|int, mixed> $data) : Category
Parameters
- $data : array<string|int, mixed>
Return values
Category —delete()
public
delete(ObjectId $categoryId, ObjectId $organizationId) : bool
Parameters
- $categoryId : ObjectId
- $organizationId : ObjectId
Return values
bool —deleteFromDataSetDefaultCategories()
public
deleteFromDataSetDefaultCategories(ObjectId $categoryId) : void
Parameters
- $categoryId : ObjectId
Return values
void —download()
public
download(ObjectId $organizationId) : TmpFile
Parameters
- $organizationId : ObjectId
Return values
TmpFile —getCollection()
public
getCollection() : mixed
Return values
mixed —getDefaultCategories()
public
getDefaultCategories(ObjectId $dataSetId) : array<string|int, Category>
Parameters
- $dataSetId : ObjectId
Tags
Return values
array<string|int, Category> —update()
public
update(CustomCategory $category, array<string|int, mixed> $data) : Category
Parameters
- $category : CustomCategory
- $data : array<string|int, mixed>
Return values
Category —upload()
public
upload(array<string|int, mixed> $data, ObjectId $dataSetId, ObjectId $organizationId) : void
Parameters
- $data : array<string|int, mixed>
- $dataSetId : ObjectId
- $organizationId : ObjectId
Return values
void —validateChildrenCategory()
private
validateChildrenCategory(CustomCategory $category, array<string|int, mixed> $data) : void
Parameters
- $category : CustomCategory
- $data : array<string|int, mixed>