CoolCMS API

OrderListTrait

Order grid: status colors from `status.class`, filters.

Table of Contents

Methods

renderShow()  : void
createComponentGrid()  : DataGrid
decorateInvoices()  : void
Decorates the grid page with invoices in one `WHERE order_id IN (...)` query. An invoice is linked to the order only by a flat scalar (no cross-module FK), so `setIncludes()` cannot load it.
invoiceTypeNameOptions()  : array<int, string>
Returns the invoice type map `id => name` for the column; without it the list would show only numbers and an invoice could not be told from a credit note.

Methods

decorateInvoices()

Decorates the grid page with invoices in one `WHERE order_id IN (...)` query. An invoice is linked to the order only by a flat scalar (no cross-module FK), so `setIncludes()` cannot load it.

private decorateInvoices(array<int, object> $items) : void
Parameters
$items : array<int, object>

invoiceTypeNameOptions()

Returns the invoice type map `id => name` for the column; without it the list would show only numbers and an invoice could not be told from a credit note.

private invoiceTypeNameOptions() : array<int, string>
Return values
array<int, string>
On this page

Search results