You are here

function rooms_pricing_query_rooms_pricing_access_alter in Rooms - Drupal Booking for Hotels, B&Bs and Vacation Rentals 7

Implements hook_query_TAG_alter().

File

modules/rooms_pricing/rooms_pricing.module, line 90
Manages pricing for Bookable Units and displaying dates on the jquery FullCalendar plugin.

Code

function rooms_pricing_query_rooms_pricing_access_alter(QueryAlterableInterface $query) {

  // Look for 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'] === 'rooms_units') {
      rooms_entity_access_query_alter($query, 'rooms_unit', $table['alias'], NULL, 'update pricing');
      break;
    }
  }
}