Class CategoryRepositoryDeleter

Class CategoryRepositoryDeleter

This class deletes category records from the database and is used in the category repository among the classes for writing and reading category records.

CategoryRepositoryDeleter implements CategoryRepositoryDeleterInterface

Methods summary

public __construct( CI_DB_query_builder $db, ProductRepositoryInterface $productRepository )

CategoryRepositoryDeleter constructor.

public deleteById( IdType $categoryId ) : CategoryRepositoryDeleter

Deletes a specific category entity.

public deleteRelatedProductsOfCategory( IdCollection $categoryIds ) :

Deletes related products of given category. All products that are only connected to the given category gets removed.

Properties summary

protected $db : CI_DB_query_builder

Database connector.