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
Applies the class default sorting
_applyDefaultSorting()
inherited abstract
Applies a sorting based on sorter param (if sorting is supplied) or apply default sorting.
_applySorting(array $sorters = array()) : $this|\ProductListProvider
inherited
Throws |
- \InvalidArgumentException
if some element of the $sorters array is not a instance of Sorter object
|
Arguments
$sorters
array
Array of Sorter objects.
Response
$this|\ProductListProvider
Same instance for chained method calls.
return the child class Field Map array.
_getFieldMap() : \array.
inherited abstract
Parse an order by sql query into a array with fieldname and direction.
_parseOrderByString(\StringType|null $orderBy = null) : array
inherited
Arguments
Response
array
with sort information structured as ['field'=>'', 'direction'=>''].
Prepares the CategoryListItemCollection object.
_prepareCollection(array $result) : \CategoryListItemCollection
Build the select part of the query build.
_select() : \CategoryListProvider
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.
Return the related database field of a given object(Entity) field.
_translateToDatabaseField(\string $fieldName) : \string.
inherited
Throws |
- \InvalidArgumentException
if the provided field name is not a valid mapped field
|
Arguments
$fieldName
\string
Object Field name.
Response
\string.
Parse an order by sql query into a array with fieldname and direction.
_translateToJsonFieldName(\StringType $databaseFieldName) : string|FALSE
inherited
Arguments
$databaseFieldName
\StringType
the database field name. It can be supplied as table.fieldName or fieldName.
Response
string|FALSE
will return the field name or FALSE if the field doesn't exist.
Returns a category list based the parent ID provided.
getByParentId(\IdType $parentId) : \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
$pager
\Pager|null
(Optional) Pager object with pagination information
$sorters
array
(Optional) array of Sorter objects with data sorting information
Response
\CategoryListItemCollection
Properties
Language code.
languageCode : \LanguageCode
Array of conditions.
conditions : array
Category Repository.
categoryRepo : \CategoryRepositoryInterface
db
db : \\CI_DB_query_builder
inherited
Type(s)
\\CI_DB_query_builder