CategoryRepositoryReaderInterface
in
Interface CategoryRepositoryReaderInterface
This interface defines methods for fetching category records from the database and is used in the category repository among the classes for writing and deleting category records.
Tags
Table of Contents
- getById() : StoredCategoryInterface
- Returns a category by the given ID.
- getByParentId() : IdCollection
- Returns all Categories with the provided parent ID.
- getCategoryIdsTree() : IdCollection
- Returns an id collection with the ids of subcategories.
Methods
getById()
Returns a category by the given ID.
public
getById(IdType $categoryId) : StoredCategoryInterface
Parameters
- $categoryId : IdType
-
Category ID.
Return values
StoredCategoryInterface —getByParentId()
Returns all Categories with the provided parent ID.
public
getByParentId(IdType $parentId) : IdCollection
Parameters
- $parentId : IdType
Return values
IdCollection —getCategoryIdsTree()
Returns an id collection with the ids of subcategories.
public
getCategoryIdsTree(IdType $parentCategoryId) : IdCollection
Parameters
- $parentCategoryId : IdType
-
Parent category id.