Overview
  • Package
  • Class
  • Tree
  • Todo

Packages

  • AddonValue
    • Interfaces
  • AdminHttpViewControllers
  • ApiV2Controllers
  • Authentication
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Strategies
  • Category
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • Customer
    • Address
    • Country
    • CountryZone
    • Interfaces
    • Storages
    • Validation
    • ValueObjects
  • Email
    • Collections
    • Entities
    • Exceptions
    • Interfaces
    • Repository
    • ValueObjects
  • Extensions
    • Customers
    • Emails
    • Helpers
    • Invoices
    • Orders
    • Serializers
    • Templates
  • Http
    • Collections
    • Exceptions
    • Factories
    • Interfaces
    • ValueObjects
  • HttpViewControllers
  • InfoBox
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
  • Invoice
    • Interfaces
    • ValueObjects
  • Loaders
    • CrossCuttingLoader
    • GXCoreLoader
    • Interfaces
  • Modules
    • Collections
    • Controllers
    • Interfaces
  • None
  • Order
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
    • ValueObjects
  • Precheck
  • Product
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Providers
    • Repositories
    • Storages
  • ProductModule
    • Collections
    • Deleter
    • Entities
    • Factories
    • Interface
    • Interfaces
    • Reader
    • Repositories
    • Writer
  • Shared
    • ClassFinder
    • Exceptions
    • FileSystem
    • Interfaces
    • Storage
    • Types
  • SharedShoppingCart
    • Interfaces
  • Slider
    • Collections
    • Entities
    • Factories
    • Interfaces
    • Repositories
    • Storages
  • Statistics
    • Interfaces
  • UserConfiguration
    • Interfaces
    • Repository

Classes

  • OrderListGenerator
  • OrderObjectService
  • OrderReadService
  • OrderWriteService

Interfaces

  • OrderItemAttributeFactoryInterface

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 )

OrderListGenerator Constructor

OrderListGenerator Constructor

Parameters

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

Get Order List Items

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

OrderListItemCollection

Throws

InvalidArgumentException
If the result rows contain invalid values.

Link

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

Implementation of

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

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 - totalWeight => orders.order_total_weight

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

OrderListItemCollection

Throws

BadMethodCallException
InvalidArgumentException

Implementation of

OrderListGeneratorInterface::filterOrderList()
public integer
# filterOrderListCount( array $filterParameters )

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

$filterParameters

Returns

integer

Throws

BadMethodCallException

Implementation of

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

Filter records by a single keyword string.

Filter 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

mixed

Throws

InvalidArgumentException
If the result rows contain invalid values.

Implementation of

OrderListGeneratorInterface::getOrderListByKeyword()
public integer
# getOrderListByKeywordCount( StringType $keyword )

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

Implementation of

OrderListGeneratorInterface::getOrderListByKeywordCount()
public integer
# getOrderListCount( )

Get the total count of all orders

Get the total count of all orders

Returns

integer

Implementation of

OrderListGeneratorInterface::getOrderListCount()
protected OrderListGenerator
# _select( )

Execute the select and join methods.

Execute the select and join methods.

Returns

OrderListGenerator
Returns the instance object for method chaining.

Throws

BadMethodCallException
protected
# _setKeywordWhereClause( StringType $keyword )

Parameters

$keyword
Keyword string to be used for searching in order records.
protected string
# _ordersColumns( )

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

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

Returns

string
protected string
# _ordersStatusColumns( )

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

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

Returns

string
protected string
# _ordersTotalColumns( )

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

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

Returns

string
protected string
# _addressColumns( string $type )

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

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

Parameters

$type
Whether delivery or billing.

Returns

string

Throws

BadMethodCallException
protected string
# _customersStatusColumns( )

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

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

Returns

string
protected string
# _invoicesColumns( )

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.

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.

Returns

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

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

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

Parameters

$type
Whether delivery or billing.
$row
Array which contain data about an order result row.

Returns

OrderAddressBlock

Throws

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

Add limit configuration to the database object.

Add limit configuration to the database object.

Parameters

$startIndex
$maxCount

Returns

OrderListGenerator
Returns the instance object for method chaining.
protected OrderListGenerator
# _order( StringType $orderBy = null )

Set the order by clause of the query.

Set the order by clause of the query.

Parameters

$orderBy

Returns

OrderListGenerator
Returns the instance object for method chaining.
protected OrderListGenerator
# _group( )

Execute the group by statement.

Execute the group by statement.

Returns

OrderListGenerator
Returns the instance object for method chaining.
protected OrderListItemCollection
# _prepareCollection( array $result )

Prepare the OrderListItemCollection object.

Prepare the OrderListItemCollection object.

This method will prepare the collection object which is going to be returned by both the "get" and "filter" methods. The following values are required to be present in each row of the $result parameter: - orders_id - customers_id - customers_firstname - customers_lastname - date_purchased - payment_class - payment_method - shipping_class - shipping_method - orders_status_id - orders_status_name - total_sum

Parameters

$result
Contains the order data.

Returns

OrderListItemCollection

Throws

InvalidArgumentException
protected OrderPaymentType
# _createOrderPaymentType( array $row )

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

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

Parameters

$row
Row array with data about the order payment type.

Returns

OrderPaymentType
protected OrderShippingType
# _createOrderShippingType( array $row )

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

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

Parameters

$row
Row array with data about the order shipping type.

Returns

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

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

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

Parameters

$type
Whether 'shipping' or 'payment', used to determine the expected order type class.
$row
Row array with data about the order type.

Returns

OrderShippingType|OrderPaymentType

Throws

InvalidArgumentException
protected CustomerMemoCollection
# _createMemoCollectionByCustomersId( integer $customersId )

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

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

Parameters

$customersId
Id of customer.

Returns

CustomerMemoCollection
protected StringCollection
# _createTrackingLinksByOrderId( integer $orderId )

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

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

Parameters

$orderId
Id of current order.

Returns

StringCollection

Throws

InvalidArgumentException
protected IdCollection
# _createWithdrawalIdsByOrderId( integer $orderId )

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

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

Parameters

$orderId
Id of current order.

Returns

IdCollection

Throws

InvalidArgumentException
protected StringCollection
# _createInvoiceNumberCollectionByOrderId( $orderId )

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

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

Parameters

$orderId
of current order

Returns

StringCollection

Throws

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

Filter the order records.

Filter the order records.

This method contains the filtering logic. It can be overloaded in order to provide a custom filtering logic.

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

CI_DB_result

Throws

BadMethodCallException

Properties summary

protected CI_DB_query_builder $db
#
protected integer $defaultLanguageId
#
API documentation generated by ApiGen