function redhen_contact_types_list_page in RedHen CRM 7
Page callback for adding a contact type.
Return a list of available contacts to add or the add contact page if there's only a single contact type.
1 string reference to 'redhen_contact_types_list_page'
- redhen_contact_menu in modules/
redhen_contact/ redhen_contact.module - Implements hook_menu().
File
- modules/
redhen_contact/ includes/ redhen_contact.pages.inc, line 168
Code
function redhen_contact_types_list_page() {
$item = menu_get_item();
$content = system_admin_menu_block($item);
// Bypass the rehen_contact/add listing if only one contact type is available.
if (count($content) == 1) {
$item = array_shift($content);
drupal_goto($item['href']);
}
return theme('redhen_contact_add_list', array(
'content' => $content,
));
}