function bat_unit_load in Booking and Availability Management Tools for Drupal 7
Same name and namespace in other branches
- 8 modules/bat_unit/bat_unit.module \bat_unit_load()
Fetches a unit object.
Parameters
int $unit_id: Integer specifying the unit id.
bool $reset: A boolean indicating whether the internal cache should be reset.
Return value
BatUnit|false A fully-loaded $unit object or FALSE if it cannot be loaded.
See also
5 calls to bat_unit_load()
- bat_calendar_reference_autocomplete_unit_validate in modules/
bat_calendar_reference/ bat_calendar_reference.module - Validate unit.
- bat_calendar_reference_field_formatter_view in modules/
bat_calendar_reference/ bat_calendar_reference.module - Implements hook_field_formatter_view().
- bat_calendar_reference_unit_autocomplete_value in modules/
bat_calendar_reference/ bat_calendar_reference.module - Value callback for a bat_calendar_reference autocomplete element.
- bat_event_edit_form_validate in modules/
bat_event/ bat_event.admin.inc - Form API validate callback for the event form.
- FullCalendarFixedStateEventFormatter::format in modules/
bat_fullcalendar/ src/ FullCalendarFixedStateEventFormatter.php
File
- modules/
bat_unit/ bat_unit.module, line 806
Code
function bat_unit_load($unit_id, $reset = FALSE) {
$units = bat_unit_load_multiple(array(
$unit_id,
), array(), $reset);
return reset($units);
}