phpDocumentor

CategoryRepository
in package
implements CategoryRepositoryInterface

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.

Tags
category

System

subpackage

Repositories

Interfaces, Classes and Traits

CategoryRepositoryInterface
Interface CategoryRepositoryInterface

Table of Contents

$addonValueService  : AddonValueServiceInterface
Addon value service.
$customerStatusProvider  : CustomerStatusProviderInterface
Customer Status Provider
$deleteHistoryWriteService  : DeleteHistoryWriteServiceInterface
$deleter  : CategoryRepositoryDeleterInterface
Category repository deleter.
$reader  : CategoryRepositoryReaderInterface
Category repository reader.
$settingsRepo  : CategorySettingsRepositoryInterface
Category settings repository.
$urlRewriteStorage  : UrlRewriteStorage
$writer  : CategoryRepositoryWriterInterface
Category repository writer.
__construct()  : mixed
Initialize the category repository.
add()  : int
Adds a category.
deleteCategoryById()  : CategoryRepository
Deletes a category by the given ID.
getActiveCategoryIdsTree()  : IdCollection
Returns an id collection with the ids of the active subcategories.
getCategoryById()  : StoredCategoryInterface
Gets a category by the given ID.
getCategoryIdsByParentId()  : IdCollection
Returns all Categories with the provided parent ID.
getCategoryIdsTree()  : IdCollection
Returns an id collection with the ids of subcategories.
store()  : CategoryRepository
Stores a category.

Properties

Methods

__construct()

Initialize the category repository.

public __construct(CategoryRepositoryReaderInterface $reader, CategoryRepositoryWriterInterface $writer, CategoryRepositoryDeleterInterface $deleter, CategorySettingsRepositoryInterface $settingsRepo, AddonValueServiceInterface $addonValueService, CustomerStatusProviderInterface $customerStatusProvider, UrlRewriteStorage $urlRewriteStorage, DeleteHistoryWriteServiceInterface $deleteHistoryWriteService) : mixed
Parameters
$reader : CategoryRepositoryReaderInterface

Reader instance to fetch category data from the storage.

$writer : CategoryRepositoryWriterInterface

Writer instance to store or add category data in the storage.

$deleter : CategoryRepositoryDeleterInterface

Deleter instance to remove category data from the storage.

$settingsRepo : CategorySettingsRepositoryInterface

Category setting repository to save/add/remove category settings in the storage.

$addonValueService : AddonValueServiceInterface

Addon value service instance to handle the category addon values.

$customerStatusProvider : CustomerStatusProviderInterface

Customer status provider to handle group permissions

$urlRewriteStorage : UrlRewriteStorage

Url rewrite storage.

$deleteHistoryWriteService : DeleteHistoryWriteServiceInterface
Return values
mixed

Search results