function bat_unit_get_type_bundles in Booking and Availability Management Tools for Drupal 8
Same name and namespace in other branches
- 7 modules/bat_unit/bat_unit.module \bat_unit_get_type_bundles()
Gets an array of all type bundles, keyed by the bundle name.
Parameters
string $bundle_name: If set, the bundle with the given name is returned.
Return value
\Drupal\bat_unit\Entity\TypeBundle[] Depending whether $bundle isset, an array of type bundles or a single one.
3 calls to bat_unit_get_type_bundles()
- bat_type_bundles_ids in modules/
bat_unit/ bat_unit.module - Helper function to easily get Bat Type bundles in an array for use in forms, etc.
- UnitPermissions::permissions in modules/
bat_unit/ src/ UnitPermissions.php - Returns an array of filter permissions.
- UnitTypeAddAccessCheck::access in modules/
bat_unit/ src/ Access/ UnitTypeAddAccessCheck.php - Checks access to the unit type add page for the type bundle.
File
- modules/
bat_unit/ bat_unit.module, line 548 - 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_unit_get_type_bundles($bundle_name = NULL) {
return TypeBundle::loadMultiple();
}