commerce_product_uri

  1. commerce
    1. 7
Versions
7 commerce_product_uri($product)

Entity uri callback: gives modules a chance to specify a path for a product.

▾ 1 function calls commerce_product_uri()

commerce_product_ui_product_uri in modules/product/commerce_product_ui.module
Entity uri callback: points to the edit form of the given product if no other URI is specified.

Code

modules/product/commerce_product.module, line 151

<?php
function commerce_product_uri($product) {
  // Allow modules to specify a path, returning the first one found.
  foreach (module_implements('commerce_product_uri') as $module) {
    $uri = module_invoke($module, 'commerce_product_uri', $product);

    // If the implementation returned data, use that now.
    if (!empty($uri)) {
      return $uri;
    }
  }

  return NULL;
}
?>