function commerce_customer_ui_customer_profile_add_page in Commerce Core 7
Menu callback: display a list of customer profile types that the user can create.
1 string reference to 'commerce_customer_ui_customer_profile_add_page'
- commerce_customer_ui_menu in modules/
customer/ commerce_customer_ui.module - Implements hook_menu().
File
- modules/
customer/ includes/ commerce_customer_ui.profiles.inc, line 12 - Page callbacks and form builder functions for administering customer profiles.
Code
function commerce_customer_ui_customer_profile_add_page() {
$item = menu_get_item();
$content = system_admin_menu_block($item);
// Bypass the admin/commerce/customers/profiles/add listing if only one
// customer profile available.
if (count($content) == 1) {
$item = array_shift($content);
drupal_goto($item['href']);
}
return theme('customer_profile_add_list', array(
'content' => $content,
));
}