CategoryReadServiceInterface
in
Interface CategoryReadServiceInterface
This interface defines methods for retrieving data of a particular category and a collection of specific categories.
Tags
Table of Contents
- findRewriteUrl() : null|UrlRewrite
- Returns a single UrlRewrite instance for the provided category ID and language ID or NULL if no entry was found.
- findUrlRewritesByRewriteUrl() : UrlRewriteCollection
- Returns an UrlRewriteCollection with UrlRewrite instances for the provided rewrite url.
- getActiveCategoryIdsTree() : IdCollection
- Returns an id collection with the ids of the active subcategories.
- getActiveCategoryList() : CategoryListItemCollection
- Returns an active CategoryListItemCollection of active categories.
- getCategoryById() : StoredCategoryInterface
- Returns a StoredCategory object with the provided category ID.
- getCategoryIdsTree() : IdCollection
- Returns an id collection with the ids of subcategories.
- getCategoryList() : CategoryListItemCollection
- Returns a CategoryListItemCollection.
- getRewriteUrls() : UrlRewriteCollection
- Returns an UrlRewriteCollection with UrlRewrite instances for the provided category ID.
- searchCategories() : CategoryListItemCollection
- Filters category records by a given CategorySearchCondition object and returns an collection with results.
Methods
findRewriteUrl()
Returns a single UrlRewrite instance for the provided category ID and language ID or NULL if no entry was found.
public
findRewriteUrl(IdType $categoryId, IdType $languageId) : null|UrlRewrite
Parameters
Return values
null|UrlRewrite —findUrlRewritesByRewriteUrl()
Returns an UrlRewriteCollection with UrlRewrite instances for the provided rewrite url.
public
findUrlRewritesByRewriteUrl(NonEmptyStringType $rewriteUrl) : UrlRewriteCollection
Parameters
- $rewriteUrl : NonEmptyStringType
Return values
UrlRewriteCollection —getActiveCategoryIdsTree()
Returns an id collection with the ids of the active subcategories.
public
getActiveCategoryIdsTree(IdType $parentCategoryId) : IdCollection
Parameters
- $parentCategoryId : IdType
-
Parent category id.
Return values
IdCollection —getActiveCategoryList()
Returns an active CategoryListItemCollection of active categories.
public
getActiveCategoryList(LanguageCode $languageCode[, IdType|null $parentId = null ][, IdType|null $customerStatusLimit = null ]) : CategoryListItemCollection
Parameters
- $languageCode : LanguageCode
-
The language code for the wanted language.
- $parentId : IdType|null = null
-
The parent ID of the categories.
- $customerStatusLimit : IdType|null = null
-
Customer status ID to decide the allowance.
Return values
CategoryListItemCollection —An CategoryListItemCollection of active categories.
getCategoryById()
Returns a StoredCategory object with the provided category ID.
public
getCategoryById(IdType $categoryId) : StoredCategoryInterface
Parameters
- $categoryId : IdType
-
ID of the category.
Return values
StoredCategoryInterface —A StoredCategory object, depending on the provided category ID.
getCategoryIdsTree()
Returns an id collection with the ids of subcategories.
public
getCategoryIdsTree(IdType $parentCategoryId) : IdCollection
Parameters
- $parentCategoryId : IdType
-
Parent category id.
Return values
IdCollection —getCategoryList()
Returns a CategoryListItemCollection.
public
getCategoryList(LanguageCode $languageCode[, IdType|null $parentId = null ][, IdType|null $customerStatusLimit = null ]) : CategoryListItemCollection
Parameters
- $languageCode : LanguageCode
-
The language code for the wanted language.
- $parentId : IdType|null = null
-
The parent ID of the categories.
- $customerStatusLimit : IdType|null = null
-
Customer status ID to decide the allowance.
Return values
CategoryListItemCollection —A Category list item collection.
getRewriteUrls()
Returns an UrlRewriteCollection with UrlRewrite instances for the provided category ID.
public
getRewriteUrls(IdType $categoryId) : UrlRewriteCollection
Parameters
- $categoryId : IdType
Return values
UrlRewriteCollection —searchCategories()
Filters category records by a given CategorySearchCondition object and returns an collection with results.
public
searchCategories(LanguageCode $languageCode, CategorySearchCondition $condition[, Pager|null $pager = null ][, array<string|int, mixed> $sorters = [] ]) : CategoryListItemCollection
Parameters
- $languageCode : LanguageCode
-
Language code that is used for category descriptions etc.
- $condition : CategorySearchCondition
-
Conditions object for search.
- $pager : Pager|null = null
-
(Optional) Pager object with pagination information
- $sorters : array<string|int, mixed> = []
-
(Optional) array of Sorter objects with data sorting information