You are here

function bat_type_group_load in Booking and Availability Management Tools for Drupal 8

Fetches a type group object.

Parameters

int $group_id: Integer specifying the group id.

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

Return value

\Drupal\bat\Entity\TypeGroup A fully-loaded $type_group object or FALSE if it cannot be loaded.

See also

bat_type_group_load_multiple()

File

./bat.module, line 495
Contains bat.module..

Code

function bat_type_group_load($group_id, $reset = FALSE) {
  if ($reset) {
    \Drupal::entityTypeManager()
      ->getStorage('bat_type_group')
      ->resetCache();
  }
  return TypeGroup::load($group_id);
}