function bat_type_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_type_load()
Fetches a Bat Type object.
Parameters
int $type_id: Integer specifying the type id.
bool $reset: A boolean indicating whether the internal cache should be reset.
Return value
BatType|false A fully-loaded $type object or FALSE if it cannot be loaded.
See also
14 calls to bat_type_load()
- BatUnit::formatEventValue in modules/
bat_unit/ bat_unit.module - BatUnit::getEventDefaultValue in modules/
bat_unit/ bat_unit.module - bat_calendar_reference_autocomplete_unit_type_validate in modules/
bat_calendar_reference/ bat_calendar_reference.module - Validate unit type.
- bat_calendar_reference_field_formatter_view in modules/
bat_calendar_reference/ bat_calendar_reference.module - Implements hook_field_formatter_view().
- bat_calendar_reference_unit_type_autocomplete_value in modules/
bat_calendar_reference/ bat_calendar_reference.module - Value callback for a bat_calendar_reference autocomplete element.
File
- modules/
bat_unit/ bat_unit.module, line 1467
Code
function bat_type_load($type_id, $reset = FALSE) {
$types = bat_type_load_multiple(array(
$type_id,
), array(), $reset);
return reset($types);
}