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 |
__construct(\CI_DB_query_builder $query_builder)
\CI_DB_query_builder
_applyDefaultSorting()
_applyPagination(\Pager|null $pager = null) : $this|\ProductListProvider
_applySorting(array $sorters = array()) : $this|\ProductListProvider
| Throws |
|
|---|
arrayArray of Sorter objects.
$this|\ProductListProviderSame instance for chained method calls.
_getFieldMap() : \array.
\array.
_parseOrderByString(\StringType|null $orderBy = null) : array
arraywith sort information structured as ['field'=>'', 'direction'=>''].
_prepareCollection(array $result) : \CategoryListItemCollection
_select() : \CategoryListProvider
_translateOrderByStringIntoArrayOfSorter(\StringType|null $orderBy = null) : array
arrayof Sorter objects.
_translateToDatabaseField(\string $fieldName) : \string.
| Throws |
|
|---|
\stringObject Field name.
\string.
_translateToJsonFieldName(\StringType $databaseFieldName) : string|FALSE
\StringTypethe database field name. It can be supplied as table.fieldName or fieldName.
string|FALSEwill return the field name or FALSE if the field doesn't exist.
getByParentId(\IdType $parentId) : \CategoryListItemCollection
searchCategories(\CategorySearchCondition $condition, \Pager|null $pager = null, array $sorters = array()) : \CategoryListItemCollection
array(Optional) array of Sorter objects with data sorting information
\CategoryListItemCollection
conditions : array
| var |
|---|
array
categoryRepo : \CategoryRepositoryInterface
db : \\CI_DB_query_builder
| var |
|---|
\\CI_DB_query_builder