function bat_booking_access in Booking and Availability Management Tools for Drupal 8
Same name and namespace in other branches
- 7 modules/bat_booking/bat_booking.module \bat_booking_access()
Determines whether the given user has access to a unit.
Parameters
string $op: The operation being performed. One of 'view', 'update', 'create', 'delete' or just 'edit' (being the same as 'create' or 'update').
\Drupal\bat_booking\Entity\Booking $booking: Optionally a booking to check access for. If nothing is given, access for all bookings is determined.
object $account: The user to check for. Leave it to NULL to check for the global user.
Return value
\Drupal\Core\Access\AccessResult
1 call to bat_booking_access()
- BookingAccessControlHandler::checkCreateAccess in modules/
bat_booking/ src/ BookingAccessControlHandler.php - Performs create access checks.
File
- modules/
bat_booking/ bat_booking.module, line 30
Code
function bat_booking_access(EntityInterface $entity, $operation, AccountInterface $account) {
return bat_entity_access($entity, $operation, $account);
}