You are here

function bat_booking_load in Booking and Availability Management Tools for Drupal 8

Same name and namespace in other branches
  1. 7 modules/bat_booking/bat_booking.module \bat_booking_load()

Fetches a booking object.

Parameters

int $booking_id: Integer specifying the booking id.

bool $reset: A boolean indicating whether the internal cache should be reset.

Return value

\Drupal\bat_booking\Entity\Booking|false A fully-loaded $booking object or FALSE if it cannot be loaded.

See also

bat_booking_load_multiple()

File

modules/bat_booking/bat_booking.module, line 123

Code

function bat_booking_load($booking_id, $reset = FALSE) {
  $bookings = bat_booking_load_multiple([
    $booking_id,
  ], [], $reset);
  return reset($bookings);
}