function bat_unit_query_bat_unit_access_alter in Booking and Availability Management Tools for Drupal 7
Same name and namespace in other branches
- 8 modules/bat_unit/bat_unit.module \bat_unit_query_bat_unit_access_alter()
Implements hook_query_TAG_alter().
File
- modules/
bat_unit/ bat_unit.module, line 365
Code
function bat_unit_query_bat_unit_access_alter(QueryAlterableInterface $query) {
// Look for an unit base table to pass to the query altering function or else
// assume we don't have the tables we need to establish order related altering
// right now.
foreach ($query
->getTables() as $table) {
if ($table['table'] === 'bat_units') {
bat_entity_access_query_alter($query, 'bat_unit', $table['alias']);
break;
}
}
}