CategoryListProvider

Extends \AbstractDataPaginator Implements \CategoryListProviderInterface

Class CategoryListProvider

This class provides methods for creating a list of flattened categories with just its essential data. The list of categories is filtered by its parent category ID and customer status permissions and for simplicity it contains language specific data only in one language.

category

System

package

Category

subpackage

Providers

Methods

ManufacturerReader constructor.

__construct(\CI_DB_query_builder $query_builder) 
inherited

Arguments

$query_builder

\CI_DB_query_builder

Translate an order by sql instruction into a array of Sorter

_translateOrderByStringIntoArrayOfSorter(\StringType|null $orderBy = null) : array
inherited

Arguments

$orderBy

\StringType|null

SQL instruction with fields to sort.

Response

array

of Sorter objects.

Returns a category list based the parent ID provided.

getByParentId(\IdType $parentId) : \CategoryListItemCollection

Arguments

$parentId

\IdType

Category parent ID.

Response

\CategoryListItemCollection

Filters category records by a given CategorySearchCondition object and returns an collection with results.

searchCategories(\CategorySearchCondition $condition, \Pager|null $pager = null, array $sorters = array()) : \CategoryListItemCollection

Arguments

$condition

\CategorySearchCondition

Conditions object for search.

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\CategoryListItemCollection

Properties