function bat_event_query_bat_event_access_alter in Booking and Availability Management Tools for Drupal 8
Same name and namespace in other branches
- 7 modules/bat_event/bat_event.module \bat_event_query_bat_event_access_alter()
Implements hook_query_TAG_alter().
File
- modules/
bat_event/ bat_event.module, line 225 - Manage Events - Events store the EventValue of a Unit over a period of time.
Code
function bat_event_query_bat_event_access_alter(AlterableInterface $query) {
// Look for an event 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'] === 'event') {
bat_entity_access_query_alter($query, 'bat_event', $table['alias']);
break;
}
}
}