You are here

function commerce_customer_profile_uri in Commerce Core 7

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

1 call to commerce_customer_profile_uri()
commerce_customer_ui_customer_profile_uri in modules/customer/commerce_customer_ui.module
Entity uri callback: points to the edit form of the given profile.
1 string reference to 'commerce_customer_profile_uri'
commerce_customer_entity_info in modules/customer/commerce_customer.module
Implements hook_entity_info().

File

modules/customer/commerce_customer.module, line 75
Defines the customer profile entity and API functions to manage customers and interact with them.

Code

function commerce_customer_profile_uri($profile) {

  // Allow modules to specify a path, returning the first one found.
  foreach (module_implements('commerce_customer_profile_uri') as $module) {
    $uri = module_invoke($module, 'commerce_customer_profile_uri', $profile);

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