function _line_item_list in Ubercart 6.2
Same name and namespace in other branches
- 5 uc_order/uc_order_line_item.inc \_line_item_list()
Builds a list of line items defined in the enabled modules.
7 calls to _line_item_list()
- template_preprocess_uc_order in uc_order/
uc_order.module - Preprocess a formatted invoice with an order's data.
- uc_cart_checkout in uc_cart/
uc_cart.pages.inc - Displays the cart checkout page built of checkout panes from enabled modules.
- uc_checkout_pane_payment in payment/
uc_payment/ uc_payment_checkout_pane.inc - @file Checkout pane functions for uc_payment.module.
- uc_order_load_line_items in uc_order/
uc_order.module - Return an array containing an order's line items ordered by weight.
- uc_order_pane_line_items in uc_order/
uc_order.order_pane.inc - Handles the "Line Items" order pane.
File
- uc_order/
uc_order.line_item.inc, line 155 - 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']);
}
drupal_alter('line_item_data', $items);
usort($items, 'uc_weight_sort');
return $items;
}