commerce_product_build_content

  1. commerce
    1. 7
Versions
7 commerce_product_build_content($product, $view_mode = 'full')

Generate an array for rendering the given product.

@deprecated since 7.x-1.0-rc1

Parameters

$product A fully loaded product object.

$view_mode The view mode for displaying the product, 'full', 'node_full', 'node_teaser', 'node_rss'...

Return value

An array as expected by drupal_render().

Code

modules/product/commerce_product.module, line 524

<?php
function commerce_product_build_content($product, $view_mode = 'full') {
  return entity_get_controller('commerce_product')->view(array($product->product_id => $product), $view_mode);
}
?>