You are here

function uc_order_product_view_multiple in Ubercart 7.3

Generate an array for rendering the multiple order products.

Order products being viewed are generally expected to be fully-loaded entity objects, thus have their name or id key set. However, it is possible to view a single entity without any id, e.g. for generating a preview during creation.

Parameters

array $order_products: The array of order product to render.

$view_mode: A view mode as used by this entity type, e.g. 'full', 'teaser'...

$langcode: (optional) A language code to use for rendering. Defaults to the global content language of the current request.

$page: (optional) If set will control if the entity is rendered: if TRUE the entity will be rendered without its title, so that it can be embedded in another context. If FALSE the entity will be displayed with its title in a mode suitable for lists. If unset, the page mode will be enabled if the current path is the URI of the entity, as returned by entity_uri().

Return value

The renderable array, keyed by the entity type and by entity identifiers, for which the entity name is used if existing - see entity_id(). If there is no information on how to view an entity, FALSE is returned.

5 calls to uc_order_product_view_multiple()
template_preprocess_uc_order in uc_order/uc_order.module
Preprocesses a formatted invoice with an order's data.
theme_uc_cart_review_table in uc_cart/uc_cart_checkout_pane.inc
Formats the cart contents table on the checkout page.
theme_uc_checkout_pane_cart_review in uc_cart/uc_cart_checkout_pane.inc
Themes cart items on the checkout review order page.
uc_op_products_customer_table in uc_order/uc_order.order_pane.inc
Builds the order customer's view products table.
uc_op_products_view_table in uc_order/uc_order.order_pane.inc
Builds the order view products table.

File

uc_order/uc_order.module, line 1191

Code

function uc_order_product_view_multiple($order_products, $view_mode = 'full', $langcode = NULL, $page = NULL) {
  return entity_view('uc_order_product', $order_products, $view_mode, $langcode, $page);
}