CategoryRepositoryInterface
in
Interface CategoryRepositoryInterface.
Table of Contents
Methods
- clearCache() : mixed
- createCategory() : Model
- createCategoryRelation() : void
- createCategoryRelationFor() : void
- createTopLevelCategoryRelation() : void
- decrementTotalItemCategories() : void
- deleteCategoryRelations() : void
- deleteOrMoveToNewCategory() : bool
- getAllCategories() : Collection
- getCategoriesForForm() : array<int, mixed>
- getCategoriesForStoreForm() : array<int, mixed>
- getCategoryForFilter() : Collection
- getChildrenIds() : array<string|int, mixed>
- getParentIds() : array<string|int, mixed>
- getStructure() : array<string|int, mixed>
- incrementTotalItemCategories() : void
- migrateCategoryRelationAfterImport() : void
- orderCategories() : bool
- toggleActive() : Model
- updateCategory() : Model
- viewForAdmin() : mixed
Methods
clearCache()
public
clearCache() : mixed
createCategory()
public
createCategory(User $context, array<string|int, mixed> $attributes) : Model
Parameters
- $context : User
- $attributes : array<string|int, mixed>
Return values
ModelcreateCategoryRelation()
public
createCategoryRelation() : void
createCategoryRelationFor()
public
createCategoryRelationFor(Model $category) : void
Parameters
- $category : Model
createTopLevelCategoryRelation()
public
createTopLevelCategoryRelation() : void
decrementTotalItemCategories()
public
decrementTotalItemCategories(Model|null $category, int $totalItem) : void
Parameters
- $category : Model|null
- $totalItem : int
deleteCategoryRelations()
public
deleteCategoryRelations(Model $category) : void
Parameters
- $category : Model
deleteOrMoveToNewCategory()
public
deleteOrMoveToNewCategory(Model $category, int $newCategoryId) : bool
Parameters
- $category : Model
- $newCategoryId : int
Return values
boolgetAllCategories()
public
getAllCategories(User $context, array<string, mixed> $attributes) : Collection
Parameters
- $context : User
- $attributes : array<string, mixed>
Return values
CollectiongetCategoriesForForm()
public
getCategoriesForForm() : array<int, mixed>
Return values
array<int, mixed>getCategoriesForStoreForm()
public
getCategoriesForStoreForm(Model|null $category) : array<int, mixed>
Parameters
- $category : Model|null
Return values
array<int, mixed>getCategoryForFilter()
public
getCategoryForFilter() : Collection
Return values
CollectiongetChildrenIds()
public
getChildrenIds(int $categoryId) : array<string|int, mixed>
Parameters
- $categoryId : int
Return values
array<string|int, mixed>getParentIds()
public
getParentIds(int $categoryId) : array<string|int, mixed>
Parameters
- $categoryId : int
Return values
array<string|int, mixed>getStructure()
public
getStructure(User $context, array<string|int, mixed> $attributes) : array<string|int, mixed>
Parameters
- $context : User
- $attributes : array<string|int, mixed>
Return values
array<string|int, mixed>incrementTotalItemCategories()
public
incrementTotalItemCategories(Model|null $category, int $totalItem) : void
Parameters
- $category : Model|null
- $totalItem : int
migrateCategoryRelationAfterImport()
public
migrateCategoryRelationAfterImport(string $tableName) : void
Parameters
- $tableName : string
orderCategories()
public
orderCategories(array<string|int, mixed> $orderIds) : bool
Parameters
- $orderIds : array<string|int, mixed>
Return values
booltoggleActive()
public
toggleActive(int $id) : Model
Parameters
- $id : int
Return values
ModelupdateCategory()
public
updateCategory(User $context, int $id, array<string, mixed> $attributes) : Model
Parameters
- $context : User
- $id : int
- $attributes : array<string, mixed>
Tags
Return values
ModelviewForAdmin()
public
viewForAdmin(User $context, array<string, mixed> $attributes) : mixed
Parameters
- $context : User
- $attributes : array<string, mixed>