CategoryRepositoryDeleterInterface
in
Interface CategoryRepositoryDeleterInterface
This interface defines methods for deleting category records from the database and is used in the category repository among the interfaces for writing and reading category records.
Tags
Table of Contents
- deleteById() : mixed
- Deletes a category based on the ID provided.
- deleteRelatedProductsOfCategory() : $this|CategoryRepositoryDeleterInterface
- Deletes related products of given category.
Methods
deleteById()
Deletes a category based on the ID provided.
public
deleteById(IdType $categoryId) : mixed
Parameters
- $categoryId : IdType
-
Category ID.
Return values
mixed —deleteRelatedProductsOfCategory()
Deletes related products of given category.
public
deleteRelatedProductsOfCategory(IdCollection $categoryIds) : $this|CategoryRepositoryDeleterInterface
All products that are only connected to the given category gets removed.
Parameters
- $categoryIds : IdCollection
-
Ids of categories with products to be removed.
Return values
$this|CategoryRepositoryDeleterInterface —Same instance for chained method calls.