OrderListGeneratorInterface

Extends

Interface OrderListGeneratorInterface

category

System

package

Order

subpackage

Interfaces

Methods

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
  • invoiceNumber => invoices.invoice_number

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.

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

Filters records by a single keyword string.

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

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

\OrderListItemCollection

Order list item collection.

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