phpDocumentor

CategoryReadService
in package
implements CategoryReadServiceInterface

Class CategoryReadService

This class provides methods for retrieving data of a particular category and a collection of specific categories.

Tags
category

System

Interfaces, Classes and Traits

CategoryReadServiceInterface
Interface CategoryReadServiceInterface

Table of Contents

$categoryListProviderFactory  : CategoryListProviderFactoryInterface
Category list provider factory.
$categoryRepo  : CategoryRepositoryInterface
Category repository interface.
$urlRewriteStorage  : UrlRewriteStorage
The url rewrite storage.
__construct()  : mixed
CategoryReadService constructor.
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, including itself.
getActiveCategoryList()  : CategoryListItemCollection
Returns 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, including itself.
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.

Properties

Methods

getActiveCategoryList()

Returns 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

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

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

Return values
CategoryListItemCollection

Search results