function _line_item_list in Ubercart 5
Same name and namespace in other branches
- 6.2 uc_order/uc_order.line_item.inc \_line_item_list()
Build a list of line items defined in the enabled modules.
7 calls to _line_item_list()
- uc_cart_checkout in uc_cart/
uc_cart.module - Display the cart checkout page built of checkout panes from enabled modules.
- uc_checkout_pane_payment in payment/
uc_payment/ uc_payment_checkout_pane.inc - uc_order_load_invoice in uc_order/
uc_order.module - uc_order_load_line_items in uc_order/
uc_order.module - Return an array containing an order's line items ordered by weight. if ($stored) { $order should be an order ID. }
- uc_order_pane_line_items in uc_order/
uc_order_order_pane.inc - Handle the "Line Items" order pane.
File
- uc_order/
uc_order_line_item.inc, line 111 - This file contains the callbacks for the default line items for orders and the various functions that make line items work.
Code
function _line_item_list($action = NULL) {
static $items;
if (count($items) > 0 && $action !== 'rebuild') {
return $items;
}
$items = module_invoke_all('line_item', NULL);
foreach ($items as $i => $value) {
$items[$i]['enabled'] = variable_get('uc_li_' . $items[$i]['id'] . '_enabled', !isset($items[$i]['enabled']) ? TRUE : $items[$i]['enabled']);
$items[$i]['weight'] = variable_get('uc_li_' . $items[$i]['id'] . '_weight', !isset($items[$i]['weight']) ? 1 : $items[$i]['weight']);
}
usort($items, 'uc_weight_sort');
return $items;
}