function commerce_addressbook_profile_options_edit in Commerce Addressbook 7.3
Same name and namespace in other branches
- 7.2 includes/commerce_addressbook.user.inc \commerce_addressbook_profile_options_edit()
Page callback for editing a customer profile.
1 string reference to 'commerce_addressbook_profile_options_edit'
- commerce_addressbook_menu in ./
commerce_addressbook.module - Implements hook_menu().
File
- includes/
commerce_addressbook.user.inc, line 26 - Page callbacks and form callbacks for user addressbook pages.
Code
function commerce_addressbook_profile_options_edit($account, $customer_profile) {
// Add the breadcrumb for the form's location.
commerce_addressbook_set_breadcrumb($account, $customer_profile->type);
// If the profile is referenced by an order, make sure it gets duplicated.
$profile = clone $customer_profile;
if (!commerce_customer_profile_can_delete($customer_profile)) {
$profile->previous_id = $profile->profile_id;
unset($profile->profile_id);
unset($profile->revision_id);
$profile->is_new = TRUE;
}
module_load_include('inc', 'commerce_customer', 'includes/commerce_customer_profile.forms');
return drupal_get_form('commerce_addressbook_customer_profile_form', $profile);
}