function merci_reservation_add_page in MERCI (Manage Equipment Reservations, Checkout and Inventory) 7.3
1 string reference to 'merci_reservation_add_page'
- ReservationUIController::hook_menu in merci_reservation/
includes/ entity.ui.inc - Provides definitions for implementing hook_menu().
File
- merci_reservation/
merci_reservation.module, line 19
Code
function merci_reservation_add_page($entity_type) {
$merci_reservation_types = merci_reservation_types();
// Bypass the node/add listing if only one content type is available.
if (count($merci_reservation_types) == 1) {
// Get entity info for our bundles.
$info = entity_get_info($entity_type);
$type = reset($merci_reservation_types);
drupal_goto($info['admin ui']['path'] . '/add/' . $type->type);
}
return entity_ui_bundle_add_page($entity_type);
}