You are here

function commerce_addressbook_set_breadcrumb in Commerce Addressbook 7.2

Same name and namespace in other branches
  1. 7.3 includes/commerce_addressbook.user.inc \commerce_addressbook_set_breadcrumb()

Sets the breadcrumb for address book forms.

Parameters

$account: The user object.

$profile_type: The machine-readable name of the customer profile type

3 calls to commerce_addressbook_set_breadcrumb()
commerce_addressbook_profile_create in includes/commerce_addressbook.user.inc
Page callback for creating a customer profile of a given type.
commerce_addressbook_profile_options_delete_form in includes/commerce_addressbook.user.inc
Page callback for deleting a customer profile.
commerce_addressbook_profile_options_edit in includes/commerce_addressbook.user.inc
Page callback for editing a customer profile.

File

includes/commerce_addressbook.user.inc, line 197
Page callbacks and form callbacks for user addressbook pages.

Code

function commerce_addressbook_set_breadcrumb($account, $profile_type) {
  $type_name = commerce_customer_profile_type_get_name($profile_type);
  $breadcrumb = array(
    l(t('Home'), '<front>'),
    l($account->name, 'user/' . $account->uid),
    l(t('Address Book'), 'user/' . $account->uid . '/addressbook'),
    l($type_name, 'user/' . $account->uid . '/addressbook/' . $profile_type),
  );
  drupal_set_breadcrumb($breadcrumb);
}