Class CategoryRepository
Class CategoryRepository
This class handles the database operations that concern the category records of the database. It provides a layer for more complicated methods that use the writer, reader and deleter.
- CategoryRepository implements CategoryRepositoryInterface
Package: Category\Repositories
Category: System
Located at Services/Core/Category/Repositories/CategoryRepository.inc.php
Category: System
Located at Services/Core/Category/Repositories/CategoryRepository.inc.php
Methods summary
public
__construct( CategoryRepositoryReaderInterface $reader, CategoryRepositoryWriterInterface $writer, CategoryRepositoryDeleterInterface $deleter, CategorySettingsRepositoryInterface $settingsRepo, AddonValueServiceInterface $addonValueService, CustomerStatusProviderInterface $customerStatusProvider, UrlRewriteStorage $urlRewriteStorage )
Initialize the category repository.
public
getCategoryById( IdType $categoryId )
: StoredCategoryInterface
Gets a category by the given ID.
public
getCategoryIdsByParentId( IdType $parentId )
: IdCollection
Returns all Categories with the provided parent ID.
public
deleteCategoryById( IdType $categoryId )
: CategoryRepository
Deletes a category by the given ID.
public
getCategoryIdsTree( IdType $parentCategoryId )
: IdCollection
Returns an id collection with the ids of subcategories.