function _rooms_booking_manager_get_unit_type_labels in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7
Returns the actual labels of for the given rooms unit types.
Parameters
array $unit_type_ids: A list of machine names to get the labels for.
Return value
array A list of labels keys by machine name.
1 call to _rooms_booking_manager_get_unit_type_labels()
- rooms_booking_availability_search_form_builder in modules/
rooms_booking_manager/ rooms_booking_manager.availability_search.inc - Form callback for rooms_booking_availability_search_form_builder.
File
- modules/
rooms_booking_manager/ rooms_booking_manager.availability_search.inc, line 280 - Contains the rooms_booking_availability_search_form builder.
Code
function _rooms_booking_manager_get_unit_type_labels($unit_type_ids) {
// Get all labels
$unit_types = rooms_unit_get_types();
$unit_type_labels = array();
foreach ($unit_type_ids as $label) {
if (isset($unit_types[$label])) {
$unit_type_labels[$label] = $unit_types[$label]->label;
}
}
return $unit_type_labels;
}