Interface OrderListGeneratorInterface
Interface OrderListGeneratorInterface
Methods summary
public
getOrderListByConditions( string|array $conditions = [], IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null )
: OrderListItemCollection
Get Order List Items
Returns an order list item collection.
Parameters
$conditions
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).
$startIndex
- The start index of the wanted array to be returned (default = null).
$maxCount
- Maximum amount of items which should be returned (default = null).
$orderBy
- A string which defines how the items should be ordered (default = null).
Returns
Throws
InvalidArgumentException
If the result rows contain invalid values.
public
getOrderListByKeyword( StringType $keyword, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null )
: OrderListItemCollection
Filters records by a single keyword string.
Filters records by a single keyword string.
Parameters
$keyword
- Keyword string to be used for searching in order records.
$startIndex
- The start index of the wanted array to be returned (default = null).
$maxCount
- Maximum amount of items which should be returned (default = null).
$orderBy
- A string which defines how the items should be ordered (default = null).
Returns
public
getOrderListByKeywordCount( StringType $keyword )
: integer
Get count of orders filtered by keyword
Get count of orders filtered by keyword
Parameters
$keyword
- Keyword string to be used for searching in order records.
Returns
integer
public
getOrderListCount( void )
: integer
Get the total count of all orders
Get the total count of all orders
Returns
integer
public
filterOrderList( array $filterParameters, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null )
: OrderListItemCollection
Filter order list items by the provided parameters.
Filter order list items by the provided parameters.
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
Parameters
$filterParameters
- Contains the column slug-names and their values.
$startIndex
- The start index of the wanted array to be returned (default = null).
$maxCount
- Maximum amount of items which should be returned (default = null).
$orderBy
- A string which defines how the items should be ordered (default = null).
Returns
public
filterOrderListCount( array $filterParameters )
: integer
Get the filtered orders count.
Get the filtered orders count.
This number is useful for pagination functionality where the app needs to know the number of the filtered rows.
Parameters
Returns
integer
Throws
BadMethodCallException