OrderListGenerator

Extends \AbstractDataPaginator Implements \OrderListGeneratorInterface

Class OrderListGenerator

category

System

package

Order

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.

Filter order list items by the provided parameters.

filterOrderList(array $filterParameters, \Pager|null $pager = null, array $sorters = array()) : \OrderListItemCollection

The following slug names need to be used:

  • number => orders.orders_id
  • customer => orders.customers_lastname orders.customers_firstname
  • group => orders.customers_status_name
  • sum => orders_total.value
  • payment => orders.payment_method
  • shipping => orders.shipping_method
  • countryIsoCode => orders.delivery_country_iso_code_2
  • date => orders.date_purchased
  • status => orders_status.orders_status_name
  • totalWeight => orders.order_total_weight
Throws
\BadMethodCallException
\InvalidArgumentException

Arguments

$filterParameters

array

Contains the column slug-names and their values.

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\OrderListItemCollection

Get the filtered orders count.

filterOrderListCount(array $filterParameters) : integer

This number is useful for pagination functionality where the app needs to know the number of the filtered rows.

Throws
\BadMethodCallException

Arguments

$filterParameters

array

Response

integer

Get Order List Items

getOrderListByConditions(string|array $conditions = array(), \Pager|null $pager = null, array $sorters = array()) : \OrderListItemCollection

Returns an order list item collection.

link

http://www.codeigniter.com/user_guide/database/query_builder.html#looking-for-specific-data

Throws
\InvalidArgumentException

If the result rows contain invalid values.

Arguments

$conditions

string|array

Provide a WHERE clause string or an associative array (actually any parameter that is acceptable by the "where" method of the CI_DB_query_builder method).

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

\OrderListItemCollection

Filter records by a single keyword string.

getOrderListByKeyword(\StringType $keyword, \Pager|null $pager = null, array $sorters = array()) : mixed
Throws
\InvalidArgumentException

If the result rows contain invalid values.

Arguments

$keyword

\StringType

Keyword string to be used for searching in order records.

$pager

\Pager|null

(Optional) Pager object with pagination information

$sorters

array

(Optional) array of Sorter objects with data sorting information

Response

mixed

Get count of orders filtered by keyword

getOrderListByKeywordCount(\StringType $keyword) : integer

Arguments

$keyword

\StringType

Keyword string to be used for searching in order records.

Response

integer

Get the total count of all orders

getOrderListCount() : integer

Response

integer

Constants

FILTER_NO_VALUE

FILTER_NO_VALUE
var

Properties