function bat_unit_create 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_create()
Creates a unit object.
Parameters
array $values: The properties for the new unit bundle.
1 call to bat_unit_create()
- UnitAccessControlHandler::checkCreateAccess in modules/
bat_unit/ src/ UnitAccessControlHandler.php - Performs create access checks.
File
- modules/
bat_unit/ bat_unit.module, line 377 - 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_create($values = []) {
return Unit::create($values);
}