function bat_type_bundle_load in Booking and Availability Management Tools for Drupal 8
Same name and namespace in other branches
- 7 modules/bat_unit/bat_unit.module \bat_type_bundle_load()
Menu argument loader; Load a Bat Type bundle by string.
Parameters
string $bundle: The machine-readable name of a type bundle to load.
bool $reset: A boolean indicating whether the internal cache should be reset.
Return value
\Drupal\bat_unit\Entity\TypeBundle A type bundle array or FALSE if $bundle does not exist.
6 calls to bat_type_bundle_load()
- BatEventUiBulkUpdateForm::buildForm in modules/
bat_event_ui/ src/ Form/ BatEventUiBulkUpdateForm.php - Form constructor.
- BatEventUIController::calendarPage in modules/
bat_event_ui/ src/ Controller/ BatEventUIController.php - BatEventUiEventTypeForm::buildForm in modules/
bat_event_ui/ src/ Form/ BatEventUiEventTypeForm.php - Form constructor.
- BatTypeHandlerTypeCalendarsField::render in modules/
bat_unit/ src/ Plugin/ views/ field/ BatTypeHandlerTypeCalendarsField.php - Renders the field.
- UnitSetStateAction::submitForm in modules/
bat_unit/ src/ Form/ UnitSetStateAction.php - Form submission handler.
File
- modules/
bat_unit/ bat_unit.module, line 592 - Manage units - Units are things that can be booked for some period of time. (e.g. rooms - but also villas bungalows, cars, drills, you-get-the-idea etc.)
Code
function bat_type_bundle_load($bundle, $reset = FALSE) {
if ($reset) {
\Drupal::entityTypeManager()
->getStorage('bat_type_bundle')
->resetCache([
$bundle,
]);
}
return TypeBundle::load($bundle);
}