public function BatTypeUIController::addUnitsPage in Booking and Availability Management Tools for Drupal 7
Creates the markup for the add Bat Units pages when units are added through the Type configuration page.
File
- modules/
bat_unit/ bat_type.admin.inc, line 310 - BatType editing UI.
Class
- BatTypeUIController
- UI controller.
Code
public function addUnitsPage() {
$item = menu_get_item();
$bundles = bat_unit_get_bundles();
// If there is only one unit bundle go straight to that page.
if (count($bundles) == 1) {
drupal_goto($item['href'] . '/' . array_shift($bundles)->type);
}
$content['bundles'] = $bundles;
$content['item'] = $item;
return array(
'#theme' => 'bat_type_unit_add_list',
'#content' => $content,
);
}