Class OrderListGenerator

Class OrderListGenerator

OrderListGenerator implements OrderListGeneratorInterface
Package: Order
Category: System
Located at Services/Core/Order/OrderListGenerator.inc.php

Methods summary

public __construct( CI_DB_query_builder $db, PaymentTitleProvider $paymentTitleProvider, ShippingTitleProvider $shippingTitleProvider )

OrderListGenerator Constructor

public getOrderListByConditions( string|array $conditions = [], IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null ) : OrderListItemCollection

Get Order List Items

public filterOrderList( array $filterParameters, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null ) : OrderListItemCollection

Filter order list items by the provided parameters.

public filterOrderListCount( array $filterParameters ) : integer

Get the filtered orders count.

public getOrderListByKeyword( StringType $keyword, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null ) : mixed

Filter records by a single keyword string.

public getOrderListByKeywordCount( StringType $keyword ) : integer

Get count of orders filtered by keyword

public getOrderListCount( void ) : integer

Get the total count of all orders

protected _select( void ) : OrderListGenerator

Execute the select and join methods.

protected _setKeywordWhereClause( StringType $keyword )
protected _ordersColumns( void ) : string

Returns a string for the ::_select() method which contains column names of the orders table.

protected _ordersStatusColumns( void ) : string

Returns a string for the ::_select() method which contains column names of the orders status table.

protected _ordersTotalColumns( void ) : string

Returns a string for the ::_select() method which contains column names of the orders total table.

protected _addressColumns( string $type ) : string

Returns a string for the ::_select() method which contains column names of the orders table for address data.

protected _customersStatusColumns( void ) : string

Returns a string for the ::_select() method which contains fallback customer status name if no value is set in the orders table.

protected _invoicesColumns( void ) : string

Returns a string for the ::_select() method which contains fallback implosion of all invoice IDs of the order if no value is set in the orders table.

protected _createOrderAddressBlockByRow( string $type, array $row ) : OrderAddressBlock

Creates an order address block object by the given type and row_array (looped result of CIDB::result_array())

protected _limit( IntType $startIndex = null, IntType $maxCount = null ) : OrderListGenerator

Add limit configuration to the database object.

protected _order( StringType $orderBy = null ) : OrderListGenerator

Set the order by clause of the query.

protected _group( void ) : OrderListGenerator

Execute the group by statement.

protected _prepareCollection( array $result ) : OrderListItemCollection

Prepare the OrderListItemCollection object.

protected _createOrderPaymentType( array $row ) : OrderPaymentType

Creates and returns an order payment type instance by the given row data.

protected _createOrderShippingType( array $row ) : OrderShippingType

Creates and returns an order shipping type instance by the given row data.

protected _createOrderType( string $type, array $row ) : OrderShippingType|OrderPaymentType

Creates and returns whether an order shipping or payment type instance by the given row data and type argument.

protected _getPaymentOrShippingTitle( string $method, string $type ) : string

Returns the title of the given payment or shipping title.

protected _createMemoCollectionByCustomersId( integer $customersId ) : CustomerMemoCollection

Creates and returns a customer memo collection by the given customers id.

protected _createTrackingLinksByOrderId( integer $orderId ) : StringCollection

Creates and returns a string collection which contains the tracking links of the order.

protected _createWithdrawalIdsByOrderId( integer $orderId ) : IdCollection

Creates and returns a ID collection which contains the withdrawal ids of the order.

protected _createInvoiceNumberCollectionByOrderId( $orderId ) : StringCollection

Creates and returns a string collection which contains the invoice numbers of the order

protected _filter( array $filterParameters, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null ) : CI_DB_result

Filter the order records.

protected _setFilterArguments( array $filterParameters, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null ) : OrderListGeneratorInterface

Set the where clauses for the filtered order records query.

Constants summary

FILTER_NO_VALUE : string
'{no-value}'

Properties summary

protected $db : CI_DB_query_builder

		
protected $defaultLanguageId : integer