ProductListProvider

Extends \AbstractDataPaginator Implements \ProductListProviderInterface

Class ProductListProvider

category

System

package

Product

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.

Get all product list items.

getAll() : \ProductListItemCollection

Returns a paged list of product items.

getAllPaged(\Pager|null $pager = null, array $sorters = array()) : \ProductListItemCollection

Arguments

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\ProductListItemCollection

Returns a product list item collection by the provided category ID.

getByCategoryId(\IdType $categoryId) : \ProductListItemCollection
Throws
\InvalidArgumentException

if the provided category ID is not valid.

Arguments

$categoryId

\IdType

Category ID.

Response

\ProductListItemCollection

Filters products records by a given ProductSearchCondition object and returns an collection with results.

searchProducts(\ProductSearchCondition $condition, \Pager|null $pager = null, array $sorters = array()) : \ProductListItemCollection

Arguments

$condition

\ProductSearchCondition

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

\ProductListItemCollection

Count the total of filtered products.

searchProductsCount(\ProductSearchCondition $condition) : \IntType

Arguments

$condition

\ProductSearchCondition

Conditions object for search.

Response

\IntType

Properties

Maps the entity Fields with the database fields

fieldMap : 
static
var

Type(s)