function bat_type_access in Booking and Availability Management Tools for Drupal 7
Same name and namespace in other branches
- 8 modules/bat_unit/bat_unit.module \bat_type_access()
Determines whether the given user has access to a type.
Parameters
string $op: The operation being performed. One of 'view', 'update', 'create', 'delete' or just 'edit' (being the same as 'create' or 'update').
BatType $type: Optionally a type or a type bundle to check access for. If nothing is given, access for all types is determined.
object $account: The user to check for. Leave it to NULL to check for the global user.
Return value
bool Whether access is allowed or not.
5 calls to bat_type_access()
- bat_type_access_filter in modules/
bat_unit/ bat_unit.module - Filters types based on permissions for multiple values.
- bat_type_add_access in modules/
bat_unit/ bat_unit.module - Access callback: Checks whether the user has permission to add a type.
- bat_type_edit_form in modules/
bat_unit/ bat_type.admin.inc - Form callback: create or edit a type.
- bat_type_handler_delete_link_field::render in modules/
bat_unit/ views/ bat_type_handler_delete_link_field.inc - Render the field.
- bat_type_handler_edit_link_field::render in modules/
bat_unit/ views/ bat_type_handler_edit_link_field.inc - Render the field.
3 string references to 'bat_type_access'
- BatTypeUIController::hook_menu in modules/
bat_unit/ bat_type.admin.inc - Overrides hook_menu() defaults.
- bat_unit_entity_info in modules/
bat_unit/ bat_unit.module - Implements hook_entity_info().
- bat_unit_menu_alter in modules/
bat_unit/ bat_unit.module - Implements hook_menu_alter().
File
- modules/
bat_unit/ bat_unit.module, line 1305
Code
function bat_type_access($op, BatType $type = NULL, $account = NULL) {
return bat_entity_access($op, $type, $account, 'bat_type');
}