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

  • AbstractInvoiceServiceFactory
  • InvoiceArchiveReadService
  • InvoiceArchiveWriteService
  • InvoiceFileEntitler
  • InvoiceListGenerator
  • InvoiceListItem
  • InvoiceListItemCollection
  • InvoiceRepository
  • InvoiceServiceFactory

Class InvoiceListGenerator

Class InvoiceListGenerator

InvoiceListGenerator implements InvoiceListGeneratorInterface
Package: Invoice
Category: System
Located at Services/Core/Invoice/InvoiceListGenerator.inc.php

Methods summary

public
# __construct( CI_DB_query_builder $db )

InvoiceListGenerator constructor.

InvoiceListGenerator constructor.

Parameters

$db
public InvoiceListItemCollection
# getInvoiceListByConditions( array $conditions = [], IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null )

Returns an invoice list item collection by the given conditions. The other arguments helps to control fetched data.

Returns an invoice list item collection by the given conditions. The other arguments helps to control fetched data.

Parameters

$conditions
(Optional) Conditions for tht where clause.
$startIndex
(Optional) Start index for the limit clause.
$maxCount
(Optional) Max count for the limit clause.
$orderBy
(Optional) Sort order of fetched data.

Returns

InvoiceListItemCollection

Implementation of

InvoiceListGeneratorInterface::getInvoiceListByConditions()
public InvoiceListItemCollection
# filterInvoiceList( array $filterParameters, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null )

Filter invoice list items by the provided parameters.

Filter invoice list items by the provided parameters.

The following slug names need to be used: - invoiceNumber => invoices.invoice_number - invoiceDate => invoices.invoice_date - sum => invoices.total_sum - customer => invoices.billing_firstname invoices.billing_lastname - group => invoices.customer_status_name - countryIsoCode => invoices.billing_country_iso_code_2 - orderNumber => invoices.order_id - orderDate => invoices.order_date_purchased - paymentMethod => invoices.payment_class - status => orders_status.orders_status_name

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

InvoiceListItemCollection

Throws

BadMethodCallException
InvalidArgumentException

Implementation of

InvoiceListGeneratorInterface::filterInvoiceList()
public integer
# filterInvoiceListCount( array $filterParameters )

Get the filtered invoice count.

Get the filtered invoice 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

InvoiceListGeneratorInterface::filterInvoiceListCount()
protected InvoiceListItemCollection
# _prepareCollection( array $resultArray )

Prepares the InvoiceListItemCollection by the passed result array.

Prepares the InvoiceListItemCollection by the passed result array.

Parameters

$resultArray
Result array with fetched invoice data.

Returns

InvoiceListItemCollection
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

Todo

Equal to OrderListGenerator::_createOrderAddressBlockByRow() method. Maybe outsource in abstract parent.
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

Todo

Equal to OrderListGenerator::_createMemoCollectionByCustomersId() method. Maybe outsource in abstract parent.


protected
# _select( )

Execute the select and join methods.

Execute the select and join methods.

Returns


$this|InvoiceListGenerator Returns the instance object for method chaining.
protected string
# _invoicesColumns( )

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

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

Returns

string
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
# _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


$this|InvoiceListGenerator Returns the instance object for method chaining.

Todo

Equal to OrderListGenerator::_limit() method. Maybe outsource in abstract parent.
protected
# _order( StringType $orderBy = null )

Set the order by clause of the query.

Set the order by clause of the query.

Parameters

$orderBy

Returns


$this|InvoiceListGenerator Returns the instance object for method chaining.

Todo

Equal to OrderListGenerator::_order() method. Maybe outsource in abstract parent.
protected InvoiceListGenerator
# _group( )

Execute the group by statement.

Execute the group by statement.

Returns

InvoiceListGenerator
Returns the instance object for method chaining.
protected CI_DB_result
# _filter( array $filterParameters, IntType $startIndex = null, IntType $maxCount = null, StringType $orderBy = null )

Filter the invoice records.

Filter the invoice 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
protected OrderPaymentType
# _createOrderType( $class, $method )

Creates and returns payment type instance by the given class and method argument.

Creates and returns payment type instance by the given class and method argument.

Parameters

$class
about the class type.
$method
about the method type.

Returns

OrderPaymentType

Throws

InvalidArgumentException

Properties summary

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